feat: add test for assumeFalse
This commit is contained in:
parent
278b5f8efa
commit
ecff38abf6
@ -2,8 +2,7 @@ package com.baeldung.assume;
|
|||||||
|
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assume.assumeThat;
|
import static org.junit.Assume.*;
|
||||||
import static org.junit.Assume.assumeTrue;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -26,6 +25,14 @@ public class ConditionallyIgnoreTestsUnitTest {
|
|||||||
assertEquals("hello", "HELLO".toLowerCase());
|
assertEquals("hello", "HELLO".toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void whenAssumeFalseOnCondition_thenIgnore() {
|
||||||
|
final int codeVersion = 2;
|
||||||
|
assumeFalse(isCodeVersion2(codeVersion));
|
||||||
|
|
||||||
|
assertEquals("hello", "HELLO".toLowerCase());
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isCodeVersion2(final int codeVersion) {
|
private boolean isCodeVersion2(final int codeVersion) {
|
||||||
return codeVersion == 2;
|
return codeVersion == 2;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user