I was messing arround with JUnit @Theory
and find out that assumeTrue(false)
fails the theory instrad if ignore it.
This code fail the test:
@RunWith(Theories.class)
public class SnippetTest {
@Theory
public void validateIndices(){
assumeTrue(false);
}
}
SnippetTest.validateIndices Never found parameters that satisfied method assumptions. Violated assumptions: [org.junit.AssumptionViolatedException: got: false, expected: is true]
But when I'm using @Test assumption ignore it.
public class SnippetTest {
@Test
public void validateIndices() {
assumeTrue(false);
}
}
It's contraversial with Theories Documentation.
If any of the assumptions fail, the data point is silently ignored.
What am I missing or what am doing wrong?