Skip to content

Commit

Permalink
Added package intent assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Kocel committed Nov 17, 2016
1 parent 85a0acf commit 99855ec
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ public IntentAssert hasFlags(@IntentFlags int flags) {
return this;
}

public IntentAssert hasPackage(String packageName) {
isNotNull();
String actualPackage = actual.getPackage();
assertThat(packageName)
.overridingErrorMessage("Expected package <%s> but was <%s>.", packageName, actualPackage)
.isEqualTo(actualPackage);
return this;
}

public IntentAssert hasData(String uri) {
return hasData(Uri.parse(uri));
}
Expand Down

0 comments on commit 99855ec

Please sign in to comment.