refactor: move test files

This commit is contained in:
2026-04-16 18:33:38 +03:30
parent ce2268ac06
commit 70fda9d1e6
7 changed files with 14 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
package BonusTests;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class TestEmail {
static BonusExercises ex;
@BeforeAll
static void setUp() {
ex = new BonusExercises();
}
@Test
void testEmail0() {
assertTrue(ex.validateEmail("john.doe@example.com"));
}
@Test
void testEmail1() {
assertFalse(ex.validateEmail("hello world@example.com"));
}
@Test
void testEmail2() {
assertTrue(ex.validateEmail("alice_bob123@research-lab.co.uk"));
}
@Test
void testEmail3() {
assertFalse(ex.validateEmail("user@ex_ample.com"));
}
@Test
void testEmail4() {
assertFalse(ex.validateEmail("user.@-example.com"));
}
}