Schedule-Creator

Java GUI to create schedules for UNCG students
git clone git://git.wrycode.com/wrycode/archive/Schedule-Creator.git
Log | Files | Refs | README

commit 1dc3b2a2900efb44b1e94a2fd23db595fd2e36c9
parent ffebe24e5480397dd7b3d81bc9e0ff918aa2dfd9
Author: Ilyass Sfar <42755577+cloud0x9@users.noreply.github.com>
Date:   Mon,  4 May 2020 13:05:42 -0400

More email test cases, and style guide (#74)

* more email validation tests

* change name of UserUpdatedDB to be similar to other views
Diffstat:
MScheduleCreator/Tests.java | 17++++++++++++-----
MScheduleCreator/controllers/PrimaryController.java | 2+-
RScheduleCreator/resources/views/UserUpdatedDB.fxml -> ScheduleCreator/resources/views/user_updated_DB.fxml | 0
3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ScheduleCreator/Tests.java b/ScheduleCreator/Tests.java @@ -28,23 +28,30 @@ public class Tests { * Test data for method testing. */ private static void emailMethodTestData() { - //edge cases + //edge cases with some error cases + emailValidationTest("", false); emailValidationTest(" ", false); emailValidationTest("@", false); emailValidationTest(".com", false); emailValidationTest("@.com", false); - emailValidationTest("@.com", false); + emailValidationTest("a@.com", false); emailValidationTest("!@#.gov", false); emailValidationTest("123!ABC@test.co", false); emailValidationTest("aBCdE@12AbC.edu", true); + emailValidationTest("test@test", false); + emailValidationTest("@test.com", false); + emailValidationTest("abc@", false); + emailValidationTest("abc.com", false); + emailValidationTest("abc.com", false); //normal cases emailValidationTest("test@test.edu", true); emailValidationTest("test@test.gov", true); emailValidationTest("123@123.co", true); emailValidationTest("ABC@123.io", true); - emailValidationTest("123@ABC.net", true); - emailValidationTest("123@ABC.org", true); - + emailValidationTest("123@test.net", true); + emailValidationTest("123ABC@ABC.org", true); + emailValidationTest("123ABC@ABC123.org", true); + emailValidationTest("abc@123.net", true); } /** diff --git a/ScheduleCreator/controllers/PrimaryController.java b/ScheduleCreator/controllers/PrimaryController.java @@ -64,7 +64,7 @@ public class PrimaryController implements Initializable { * @throws Exception */ public void changeToDBScreen() throws Exception { - Parent root = FXMLLoader.load(getClass().getResource("/ScheduleCreator/resources/views/UserUpdatedDB.fxml")); + Parent root = FXMLLoader.load(getClass().getResource("/ScheduleCreator/resources/views/user_updated_DB.fxml")); mainContent.getChildren().clear(); mainContent.getChildren().add(root); this.setCurrentItem(this.dbItem); diff --git a/ScheduleCreator/resources/views/UserUpdatedDB.fxml b/ScheduleCreator/resources/views/user_updated_DB.fxml