Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #34 from novoda/fix-broken-test-java-8-issue
Browse files Browse the repository at this point in the history
Fix broken test java 8 issue
  • Loading branch information
eduardb authored Nov 14, 2016
2 parents b542b87 + 836ebb7 commit 12969b2
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@
import org.robolectric.RuntimeEnvironment;

import static org.fest.assertions.api.Assertions.assertThat;
import static org.fest.assertions.api.Assertions.fail;

@RunWith(RobolectricTestRunner.class)
public class SimpleChromeCustomTabsTest {

@Test(expected = DeveloperError.class)
@Test
public void givenSimpleChromeCustomTabsIsNotInitialised_whenGettingInstance_thenDeveloperErrorIsThrown() {
SimpleChromeCustomTabs.getInstance();
/** Please forgive me for what you are seeing. Given some incompatibility issues between Robolectric 3.1.4 and some versions of
* Java 8, the @Test(expected = DeveloperError.class) wasn't working.
* Will fix when we figure out how.
**/
try {
SimpleChromeCustomTabs.getInstance();
fail("A Developer error exception was expected, but there was nothing");
} catch (DeveloperError e) {
// passes
}
}

@Test
Expand Down

0 comments on commit 12969b2

Please sign in to comment.