diff --git a/src/test/java/com/r35157/libs/random/tests/HappyInitializationTests.java b/src/test/java/com/r35157/libs/random/tests/HappyInitializationTests.java deleted file mode 100644 index bb735f2..0000000 --- a/src/test/java/com/r35157/libs/random/tests/HappyInitializationTests.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.r35157.libs.random.tests; - -import com.r35157.libs.random.SomeInterface; -import com.r35157.libs.random.impl.ref.SomeImpl; -import org.junit.jupiter.api.*; -import static org.junit.jupiter.api.Assertions.assertTrue; - -@DisplayName("Happy Initialization Tests") -public class HappyInitializationTests { - - @BeforeAll - public static void beforeAll() { - System.out.println("==== Before All"); - } - - @BeforeEach - public void beforeEach() { - System.out.println("---- Before Each"); - } - - @DisplayName("Just a basic test") - @Test - void someBasicTest() { - // Arrange - String a = "abc"; - String b = "def"; - String expected = "abcdef"; - SomeInterface sut = new SomeImpl(); - - // Act - String actual = sut.concat(a, b); - - // Assert - assertTrue(actual.equals(expected)); - } - - @Disabled("Test disabled") - @Test - void dummyTest2() { - assertTrue(false); - } - - @AfterEach - public void afterEach() { - System.out.println("**** After Each"); - } - - @AfterAll - public static void afterAll() { - System.out.println("==== After All"); - } -} diff --git a/src/test/java/com/r35157/libs/random/tests/SadInitializationTests.java b/src/test/java/com/r35157/libs/random/tests/SadInitializationTests.java deleted file mode 100644 index fb2b752..0000000 --- a/src/test/java/com/r35157/libs/random/tests/SadInitializationTests.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.r35157.libs.random.tests; - -import com.r35157.libs.random.SomeInterface; -import com.r35157.libs.random.impl.ref.SomeImpl; -import org.junit.jupiter.api.*; - -import static org.junit.jupiter.api.Assertions.*; - -@DisplayName("Sad Initialization Tests") -public class SadInitializationTests { - - @BeforeAll - public static void beforeAll() { - System.out.println("==== Before All"); - } - - @BeforeEach - public void beforeEach() { - System.out.println("---- Before Each"); - } - - @DisplayName("Just another basic test") - @Test - void anotherBasicTest() { - - // Arrange + act - SomeInterface sut = new SomeImpl(); - String expectedErrorMsg = "/ by zero"; - - ArithmeticException thrown = assertThrows( - ArithmeticException.class, - sut::divideByZero, - "Expected an exception to be thrown while dividing by zero, but it didn't" - ); - String actualErrorMsg = thrown.getMessage(); - - // Assert - assertEquals(expectedErrorMsg, actualErrorMsg); - } - - @Disabled("Test disabled") - @Test - void dummyTest2() { - assertTrue(false); - } - - @AfterEach - public void afterEach() { - System.out.println("**** After Each"); - } - - @AfterAll - public static void afterAll() { - System.out.println("==== After All"); - } -}