Mocking BuildConfig values in unit tests
Chuck Greb
54

I tried your solution, and I found a problem with it.

The test will pass, but it actually doesn’t run, it just fails silently

@Test(expected = IllegalArgumentException.class)

This line will make the test “pass” but it actually crashes after the first line with the exception, and never runs the rest of the code.