Reformat JUnit 5 examples
This commit is contained in:
parent
4bc347acca
commit
e641ca0598
|
@ -3,9 +3,7 @@ package com.baeldung;
|
|||
import org.junit.gen5.api.Test;
|
||||
|
||||
import static org.junit.gen5.api.Assertions.assertEquals;
|
||||
import static org.junit.gen5.api.Assumptions.assumeFalse;
|
||||
import static org.junit.gen5.api.Assumptions.assumeTrue;
|
||||
import static org.junit.gen5.api.Assumptions.assumingThat;
|
||||
import static org.junit.gen5.api.Assumptions.*;
|
||||
|
||||
public class AssumptionTest {
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ package com.baeldung;
|
|||
|
||||
import org.junit.gen5.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.junit.gen5.api.Assertions.assertEquals;
|
||||
import static org.junit.gen5.api.Assertions.expectThrows;
|
||||
|
||||
|
@ -12,7 +10,9 @@ public class ExceptionTest {
|
|||
@Test
|
||||
void shouldThrowException() {
|
||||
Throwable exception = expectThrows(UnsupportedOperationException.class,
|
||||
() -> {throw new UnsupportedOperationException("Not supported");});
|
||||
() -> {
|
||||
throw new UnsupportedOperationException("Not supported");
|
||||
});
|
||||
assertEquals(exception.getMessage(), "Not supported");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,10 @@ package com.baeldung;
|
|||
import org.junit.gen5.api.Disabled;
|
||||
import org.junit.gen5.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.gen5.api.Assertions.assertAll;
|
||||
import static org.junit.gen5.api.Assertions.assertEquals;
|
||||
import static org.junit.gen5.api.Assertions.assertTrue;
|
||||
import static org.junit.gen5.api.Assertions.*;
|
||||
|
||||
class FirstTest {
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ public class TaggedTest {
|
|||
@Test
|
||||
@Tag("Method")
|
||||
void testMethod() {
|
||||
assertEquals(2+2, 4);
|
||||
assertEquals(2 + 2, 4);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue