-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0053f3
commit 7e188b6
Showing
6 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Feature: Android support | ||
|
||
Scenario: User email | ||
When I run "UserEmailScenario" with the defaults | ||
Then I should receive a request | ||
And the request is a valid for the error reporting API | ||
And the exception "message" equals "UserEmailScenario" | ||
And the event "user.id" is null | ||
And the event "user.email" equals "user@example.com" | ||
And the event "user.name" is null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Feature: Android support | ||
|
||
Scenario: User ID | ||
When I run "UserIdScenario" with the defaults | ||
Then I should receive a request | ||
And the request is a valid for the error reporting API | ||
And the exception "message" equals "UserIdScenario" | ||
And the event "user.id" equals "abc" | ||
And the event "user.email" is null | ||
And the event "user.name" is null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
mazerunner/src/main/java/com/bugsnag/android/mazerunner/scenarios/UserEmailScenario.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.bugsnag.android.mazerunner.scenarios | ||
|
||
import com.bugsnag.android.Bugsnag | ||
|
||
/** | ||
* Sends a handled exception to Bugsnag, which only includes a user's email | ||
*/ | ||
internal class UserEmailScenario : Scenario() { | ||
|
||
override fun run() { | ||
Bugsnag.setUser(null, "user@example.com", null) | ||
Bugsnag.notify(generateException()) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
mazerunner/src/main/java/com/bugsnag/android/mazerunner/scenarios/UserIdScenario.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.bugsnag.android.mazerunner.scenarios | ||
|
||
import com.bugsnag.android.Bugsnag | ||
|
||
/** | ||
* Sends a handled exception to Bugsnag, which only includes a user's id | ||
*/ | ||
internal class UserIdScenario : Scenario() { | ||
|
||
override fun run() { | ||
Bugsnag.setUser("abc", null, null) | ||
Bugsnag.notify(generateException()) | ||
} | ||
|
||
} |