Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add additional scenarios for release stage
- Loading branch information
1 parent
e84cd57
commit abac1f9
Showing
6 changed files
with
69 additions
and
0 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,8 @@ | ||
Feature: Android support | ||
|
||
Scenario: Notify release stage array | ||
When I run "ArrayNotifyReleaseStageScenario" with the defaults | ||
Then I should receive a request | ||
And the request is a valid for the error reporting API | ||
And the exception "errorClass" equals "java.lang.RuntimeException" | ||
And the exception "message" equals "ArrayNotifyReleaseStageScenario" |
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,8 @@ | ||
Feature: Android support | ||
|
||
Scenario: Notify release stage null | ||
When I run "NullNotifyReleaseStageScenario" with the defaults | ||
Then I should receive a request | ||
And the request is a valid for the error reporting API | ||
And the exception "errorClass" equals "java.lang.RuntimeException" | ||
And the exception "message" equals "NullNotifyReleaseStageScenario" |
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,5 @@ | ||
Feature: Android support | ||
|
||
Scenario: Null release stage | ||
When I run "NullReleaseStageScenario" with the defaults | ||
Then I should receive no requests |
16 changes: 16 additions & 0 deletions
16
...src/main/java/com/bugsnag/android/mazerunner/scenarios/ArrayNotifyReleaseStageScenario.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,16 @@ | ||
package com.bugsnag.android.mazerunner.scenarios | ||
|
||
import com.bugsnag.android.Bugsnag | ||
|
||
/** | ||
* Attempts to send a handled exception to Bugsnag, when the notifyReleaseStages is an array. | ||
*/ | ||
internal class ArrayNotifyReleaseStageScenario : Scenario() { | ||
|
||
override fun run() { | ||
Bugsnag.setReleaseStage("prod") | ||
Bugsnag.setNotifyReleaseStages("dev", "prod") | ||
Bugsnag.notify(generateException()) | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
.../src/main/java/com/bugsnag/android/mazerunner/scenarios/NullNotifyReleaseStageScenario.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,16 @@ | ||
package com.bugsnag.android.mazerunner.scenarios | ||
|
||
import com.bugsnag.android.Bugsnag | ||
|
||
/** | ||
* Attempts to send a handled exception to Bugsnag, when the notifyReleaseStages is null. | ||
*/ | ||
internal class NullNotifyReleaseStageScenario : Scenario() { | ||
|
||
override fun run() { | ||
Bugsnag.setReleaseStage("prod") | ||
// Bugsnag.setNotifyReleaseStages() | ||
Bugsnag.notify(generateException()) | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
...runner/src/main/java/com/bugsnag/android/mazerunner/scenarios/NullReleaseStageScenario.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,16 @@ | ||
package com.bugsnag.android.mazerunner.scenarios | ||
|
||
import com.bugsnag.android.Bugsnag | ||
|
||
/** | ||
* Attempts to send a handled exception to Bugsnag, when the release stage is null. | ||
*/ | ||
internal class NullReleaseStageScenario : Scenario() { | ||
|
||
override fun run() { | ||
Bugsnag.setReleaseStage(null) | ||
Bugsnag.setNotifyReleaseStages("prod") | ||
Bugsnag.notify(generateException()) | ||
} | ||
|
||
} |