* Added code for the migration from JUnit 4 to JUnit 5 * Add example for Rule migration support * Add fix to access modifiers to test methods * Remove wrong header * Add junit5-migration module and its code snippets * Add module configuration to pom * Remove test classes that were added for the migration from JUnit 4 to JUnit 5 article (moved under correct module)
24 lines
486 B
Java
24 lines
486 B
Java
package com.baeldung.junit4;
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
import static org.junit.Assume.assumeFalse;
|
|
import static org.junit.Assume.assumeTrue;
|
|
|
|
public class AssumeUnitTest {
|
|
|
|
@Test
|
|
public void trueAssumption() {
|
|
assumeTrue("5 is greater the 1", 5 > 1);
|
|
assertEquals(5 + 2, 7);
|
|
}
|
|
|
|
@Test
|
|
public void falseAssumption() {
|
|
assumeFalse("5 is less then 1", 5 < 1);
|
|
assertEquals(5 + 2, 7);
|
|
}
|
|
}
|