Reformat JUnit 5 examples

This commit is contained in:
David Morley 2016-05-23 06:14:18 -05:00
parent 4bc347acca
commit e641ca0598
4 changed files with 6 additions and 11 deletions

View File

@ -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 {

View File

@ -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");
}
}

View File

@ -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 {

View File

@ -11,6 +11,6 @@ public class TaggedTest {
@Test
@Tag("Method")
void testMethod() {
assertEquals(2+2, 4);
assertEquals(2 + 2, 4);
}
}