From 98feae942b5c37f32d23d50ea0361dde1c3cf42f Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 5 Mar 2026 12:28:18 +0100 Subject: [PATCH] Fix: Package Placement --- .../team6/models/CharityRegistryTest.java | 157 +++++++------ .../team6/models/CharityTest.java | 104 ++++----- .../team6/models/DonationTest.java | 202 ++++++++-------- .../team6/models/FeedbackTest.java | 129 +++++------ .../team6/models/SettingsTest.java | 72 ------ .../team6/models/user/SettingsTest.java | 70 ++++++ .../team6/models/user/UserTest.java | 164 +++++++++++++ .../team6/security/PasswordHasherTest.java | 8 +- .../team6/models/user/UserTest.java | 218 ------------------ .../ntnu/sytemutvikling/team6/Main.class | Bin 568 -> 0 bytes .../team6/models/user/Inbox.class | Bin 2973 -> 0 bytes .../team6/models/user/Language.class | Bin 1146 -> 0 bytes .../team6/models/user/Message.class | Bin 1559 -> 0 bytes .../team6/models/user/Role.class | Bin 1181 -> 0 bytes .../team6/models/user/Settings.class | Bin 1624 -> 0 bytes .../team6/models/user/User.class | Bin 3369 -> 0 bytes .../team6/security/PasswordHasher.class | Bin 2772 -> 0 bytes ...UserTest$constructorTests$emailTests.class | Bin 3560 -> 0 bytes .../user/UserTest$constructorTests.class | Bin 6802 -> 0 bytes .../team6/models/user/UserTest.class | Bin 571 -> 0 bytes ...sswordHasherTest$getHashPasswordTest.class | Bin 2725 -> 0 bytes ...sswordHasherTest$isValidPasswordTest.class | Bin 3211 -> 0 bytes .../team6/security/PasswordHasherTest.class | Bin 772 -> 0 bytes 23 files changed, 519 insertions(+), 605 deletions(-) delete mode 100644 helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/SettingsTest.java create mode 100644 helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/SettingsTest.java create mode 100644 helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/UserTest.java rename helpmehelpapplication/src/test/java/ntnu/{sytemutvikling => systemutvikling}/team6/security/PasswordHasherTest.java (97%) delete mode 100644 helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/models/user/UserTest.java delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Inbox.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Language.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Message.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Role.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Settings.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/User.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/security/PasswordHasher.class delete mode 100644 helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest$constructorTests$emailTests.class delete mode 100644 helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest$constructorTests.class delete mode 100644 helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest.class delete mode 100644 helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/security/PasswordHasherTest$getHashPasswordTest.class delete mode 100644 helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/security/PasswordHasherTest$isValidPasswordTest.class delete mode 100644 helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/security/PasswordHasherTest.class diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityRegistryTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityRegistryTest.java index 5176235..232431f 100644 --- a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityRegistryTest.java +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityRegistryTest.java @@ -1,94 +1,91 @@ package ntnu.systemutvikling.team6.models; -import ntnu.sytemutvikling.team6.models.Charity; -import ntnu.sytemutvikling.team6.models.CharityRegistry; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; import java.util.List; import java.util.Optional; import java.util.UUID; - -import static org.junit.jupiter.api.Assertions.*; +import ntnu.sytemutvikling.team6.models.Charity; +import ntnu.sytemutvikling.team6.models.CharityRegistry; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * UnitTest for CharityRegistry class * * @author Adrian Balunan */ - public class CharityRegistryTest { - private CharityRegistry registry; - private Charity charity; - - /* Setting up variables */ - @BeforeEach - public void setup(){ - registry = new CharityRegistry(); - charity = new Charity("Charity1", "Something Somewhere Somehow", "Cancer"); - } - - - @Test - void testAddCharitySuccessfully() { - registry.addCharity(charity); - - assertEquals(1, registry.getAllCharities().size()); - assertTrue(registry.getAllCharities().contains(charity)); - } - - @Test - void testAddCharityNullThrowsException() { - assertThrows(IllegalArgumentException.class, () -> registry.addCharity(null)); - } - - @Test - void testGetAllCharitiesReturnsUnmodifiableList() { - registry.addCharity(charity); - - List charities = registry.getAllCharities(); - assertThrows(UnsupportedOperationException.class, () -> charities.add(charity)); - } - - @Test - void testFindCharityByIdFound() { - registry.addCharity(charity); - - Optional result = registry.findCharityById(charity.getId()); - - assertTrue(result.isPresent()); - assertEquals(charity, result.get()); - } - - @Test - void testFindCharityByIdNotFound() { - Optional result = registry.findCharityById(UUID.randomUUID()); - assertTrue(result.isEmpty()); - } - - @Test - void testFindCharityByIdNullThrowsException() { - assertThrows(IllegalArgumentException.class, () -> registry.findCharityById(null)); - } - - @Test - void testRemoveCharitySuccessfully() { - registry.addCharity(charity); - - boolean removed = registry.removeCharity(charity.getId()); - - assertTrue(removed); - assertTrue(registry.getAllCharities().isEmpty()); - } - - @Test - void testRemoveCharityNotFound() { - boolean removed = registry.removeCharity(UUID.randomUUID()); - assertFalse(removed); - } - - @Test - void testRemoveCharityNullThrowsException() { - assertThrows(IllegalArgumentException.class, () -> registry.removeCharity(null)); - } + private CharityRegistry registry; + private Charity charity; + + /* Setting up variables */ + @BeforeEach + public void setup() { + registry = new CharityRegistry(); + charity = new Charity("Charity1", "Something Somewhere Somehow", "Cancer"); + } + + @Test + void testAddCharitySuccessfully() { + registry.addCharity(charity); + + assertEquals(1, registry.getAllCharities().size()); + assertTrue(registry.getAllCharities().contains(charity)); + } + + @Test + void testAddCharityNullThrowsException() { + assertThrows(IllegalArgumentException.class, () -> registry.addCharity(null)); + } + + @Test + void testGetAllCharitiesReturnsUnmodifiableList() { + registry.addCharity(charity); + + List charities = registry.getAllCharities(); + assertThrows(UnsupportedOperationException.class, () -> charities.add(charity)); + } + + @Test + void testFindCharityByIdFound() { + registry.addCharity(charity); + + Optional result = registry.findCharityById(charity.getId()); + + assertTrue(result.isPresent()); + assertEquals(charity, result.get()); + } + + @Test + void testFindCharityByIdNotFound() { + Optional result = registry.findCharityById(UUID.randomUUID()); + assertTrue(result.isEmpty()); + } + + @Test + void testFindCharityByIdNullThrowsException() { + assertThrows(IllegalArgumentException.class, () -> registry.findCharityById(null)); + } + + @Test + void testRemoveCharitySuccessfully() { + registry.addCharity(charity); + + boolean removed = registry.removeCharity(charity.getId()); + + assertTrue(removed); + assertTrue(registry.getAllCharities().isEmpty()); + } + + @Test + void testRemoveCharityNotFound() { + boolean removed = registry.removeCharity(UUID.randomUUID()); + assertFalse(removed); + } + + @Test + void testRemoveCharityNullThrowsException() { + assertThrows(IllegalArgumentException.class, () -> registry.removeCharity(null)); + } } diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityTest.java index 1707499..5c2f9c2 100644 --- a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityTest.java +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/CharityTest.java @@ -1,68 +1,62 @@ package ntnu.systemutvikling.team6.models; +import static org.junit.jupiter.api.Assertions.*; + +import java.util.UUID; import ntnu.sytemutvikling.team6.models.Charity; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import java.util.UUID; - -import static org.junit.jupiter.api.Assertions.*; - /** * UnitTesting for Charity. * * @author Adrian Balunan */ public class CharityTest { - private Charity charity; - - @BeforeEach - public void setup(){ - charity = new Charity("Charity1", "Something Somewhere Somehow", "Cancer"); - } - - /** - * Getters should work: - */ - @Test - public void testGettingIdShouldWork(){ - assertInstanceOf(UUID.class, charity.getId()); - } - @Test - public void testGettingCategoryShouldWork(){ - assertEquals("Cancer", charity.getCategory()); - } - @Test - public void testGettingNameShouldWork(){ - assertEquals( "Charity1",charity.getName()); - } - @Test - public void testGettingDescriptionShouldWork(){ - assertEquals("Something Somewhere Somehow",charity.getDescription()); - } - - /** - * Getter and setter for IsVerified should be able to switch between true and false - */ - @Test - public void testIsVerifiedReturnsCorrectly(){ - assertFalse(charity.isVerified()); - charity.setVerified(); - assertTrue(charity.isVerified()); - charity.setUnverified(); - assertFalse(charity.isVerified()); - } - - /** - * totalDonations should display accuratly and adding works - */ - @Test - public void testTotalDonationsReturnsCorrectlyAfterChanges(){ - assertEquals(0, charity.getTotalDonations()); - charity.setTotalDonations(10); - charity.setTotalDonations(5); - assertEquals(15, charity.getTotalDonations()); - } - + private Charity charity; + + @BeforeEach + public void setup() { + charity = new Charity("Charity1", "Something Somewhere Somehow", "Cancer"); + } + + /** Getters should work: */ + @Test + public void testGettingIdShouldWork() { + assertInstanceOf(UUID.class, charity.getId()); + } + + @Test + public void testGettingCategoryShouldWork() { + assertEquals("Cancer", charity.getCategory()); + } + + @Test + public void testGettingNameShouldWork() { + assertEquals("Charity1", charity.getName()); + } + + @Test + public void testGettingDescriptionShouldWork() { + assertEquals("Something Somewhere Somehow", charity.getDescription()); + } + + /** Getter and setter for IsVerified should be able to switch between true and false */ + @Test + public void testIsVerifiedReturnsCorrectly() { + assertFalse(charity.isVerified()); + charity.setVerified(); + assertTrue(charity.isVerified()); + charity.setUnverified(); + assertFalse(charity.isVerified()); + } + + /** totalDonations should display accuratly and adding works */ + @Test + public void testTotalDonationsReturnsCorrectlyAfterChanges() { + assertEquals(0, charity.getTotalDonations()); + charity.setTotalDonations(10); + charity.setTotalDonations(5); + assertEquals(15, charity.getTotalDonations()); + } } diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/DonationTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/DonationTest.java index dca66b7..c4851b5 100644 --- a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/DonationTest.java +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/DonationTest.java @@ -1,115 +1,99 @@ package ntnu.systemutvikling.team6.models; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; import java.time.LocalDateTime; -import java.util.UUID; - -import static org.junit.jupiter.api.Assertions.*; +import ntnu.sytemutvikling.team6.models.Charity; +import ntnu.sytemutvikling.team6.models.Donation; +import ntnu.sytemutvikling.team6.models.user.Inbox; +import ntnu.sytemutvikling.team6.models.user.Role; +import ntnu.sytemutvikling.team6.models.user.Settings; +import ntnu.sytemutvikling.team6.models.user.User; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; class DonationTest { - private Settings settings; - private User user; - private Charity charity; - - // -- Setup -- - @BeforeEach - public void setup(){ - charity = new Charity("name", "something somewhere somehow", "Meow"); - User = new User(); - } - - - // --- Tests --- - @Test - void testDonationInitialization() { - Charity charity = new Charity(); - User user = new User(new UserSettings(true)); - LocalDateTime now = LocalDateTime.now(); - - Donation donation = new Donation(500.0, now, charity, user); - - assertNotNull(donation.getCharityId()); - assertEquals(500.0, donation.getAmount()); - assertEquals(now, donation.getDate()); - assertEquals(charity, donation.getCharity()); - assertEquals(user, donation.getDonor()); - } - - @Test - void testAnonymousFlagWhenUserIsAnonymous() { - User user = new User(new UserSettings(true)); - Charity charity = new Charity(); - Donation donation = new Donation(100, LocalDateTime.now(), charity, user); - - // According to your logic: - // if donor.getSettings().isAnonymous() == false → donation.isAnonymous = true - // else → donation.isAnonymous = false - // - // So if user.isAnonymous() == true → donation.isAnonymous should be false - assertFalse(donation.isAnonymous()); - } - - @Test - void testAnonymousFlagWhenUserIsNotAnonymous() { - User user = new User(new UserSettings(false)); - Charity charity = new Charity(); - Donation donation = new Donation(100, LocalDateTime.now(), charity, user); - - // If user.isAnonymous() == false → donation.isAnonymous = true - assertTrue(donation.isAnonymous()); - } - - @Test - void testCharityIdIsUnique() { - Charity charity = new Charity(); - User user = new User(new UserSettings(true)); - - Donation d1 = new Donation(50, LocalDateTime.now(), charity, user); - Donation d2 = new Donation(75, LocalDateTime.now(), charity, user); - - assertNotEquals(d1.getCharityId(), d2.getCharityId()); - } - - @Test - void testAmountStoredCorrectly() { - Charity charity = new Charity(); - User user = new User(new UserSettings(true)); - - Donation donation = new Donation(123.45, LocalDateTime.now(), charity, user); - - assertEquals(123.45, donation.getAmount()); - } - - @Test - void testDateStoredCorrectly() { - LocalDateTime date = LocalDateTime.of(2024, 5, 10, 12, 30); - Charity charity = new Charity(); - User user = new User(new UserSettings(true)); - - Donation donation = new Donation(200, date, charity, user); - - assertEquals(date, donation.getDate()); - } - - @Test - void testCharityStoredCorrectly() { - Charity charity = new Charity(); - User user = new User(new UserSettings(true)); - - Donation donation = new Donation(200, LocalDateTime.now(), charity, user); - - assertEquals(charity, donation.getCharity()); - } - - @Test - void testDonorStoredCorrectly() { - Charity charity = new Charity(); - User user = new User(new UserSettings(true)); - - Donation donation = new Donation(200, LocalDateTime.now(), charity, user); - - assertEquals(user, donation.getDonor()); - } -} \ No newline at end of file + private Settings settings; + private User user; + private Charity charity; + + // -- Setup -- + @BeforeEach + public void setup() { + charity = new Charity("name", "something somewhere somehow", "Meow"); + user = + new User("Name", "Valid@gmail.com", "123", Role.NORMAL_USER, new Settings(), new Inbox()); + } + + // --- Tests --- + @Test + void testDonationInitialization() { + LocalDateTime now = LocalDateTime.now(); + + Donation donation = new Donation(500.0, now, charity, user); + + assertNotNull(donation.getCharityId()); + assertEquals(500.0, donation.getAmount()); + assertEquals(now, donation.getDate()); + assertEquals(charity, donation.getCharity()); + assertEquals(user, donation.getDonor()); + } + + @Test + void testAnonymousFlagWhenUserIsAnonymous() { + Donation donation = new Donation(100, LocalDateTime.now(), charity, user); + + // According to your logic: + // if donor.getSettings().isAnonymous() == false → donation.isAnonymous = true + // else → donation.isAnonymous = false + // + // So if user.isAnonymous() == true → donation.isAnonymous should be false + assertFalse(donation.isAnonymous()); + } + + @Test + void testAnonymousFlagWhenUserIsNotAnonymous() { + Donation donation = new Donation(100, LocalDateTime.now(), charity, user); + + // If user.isAnonymous() == false → donation.isAnonymous = true + assertTrue(donation.isAnonymous()); + } + + @Test + void testCharityIdIsUnique() { + Donation d1 = new Donation(50, LocalDateTime.now(), charity, user); + Donation d2 = new Donation(75, LocalDateTime.now(), charity, user); + + assertNotEquals(d1.getCharityId(), d2.getCharityId()); + } + + @Test + void testAmountStoredCorrectly() { + Donation donation = new Donation(123.45, LocalDateTime.now(), charity, user); + + assertEquals(123.45, donation.getAmount()); + } + + @Test + void testDateStoredCorrectly() { + LocalDateTime date = LocalDateTime.of(2024, 5, 10, 12, 30); + + Donation donation = new Donation(200, date, charity, user); + + assertEquals(date, donation.getDate()); + } + + @Test + void testCharityStoredCorrectly() { + Donation donation = new Donation(200, LocalDateTime.now(), charity, user); + + assertEquals(charity, donation.getCharity()); + } + + @Test + void testDonorStoredCorrectly() { + Donation donation = new Donation(200, LocalDateTime.now(), charity, user); + + assertEquals(user, donation.getDonor()); + } +} diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/FeedbackTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/FeedbackTest.java index f3e3e8d..b21def7 100644 --- a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/FeedbackTest.java +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/FeedbackTest.java @@ -1,91 +1,86 @@ package ntnu.systemutvikling.team6.models; -import ntnu.sytemutvikling.team6.models.Settings; -import ntnu.sytemutvikling.team6.models.User; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; import java.time.LocalDateTime; -import java.util.UUID; - -import static org.junit.jupiter.api.Assertions.*; +import ntnu.sytemutvikling.team6.models.Feedback; +import ntnu.sytemutvikling.team6.models.user.Inbox; +import ntnu.sytemutvikling.team6.models.user.Role; +import ntnu.sytemutvikling.team6.models.user.Settings; +import ntnu.sytemutvikling.team6.models.user.User; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; class FeedbackTest { - private User user; - private Settings settings; - - // -- Setup -- - @BeforeEach - public void setup() { - settings = new Settings(true); // default anonymous = true - user = new User(); - } - - // --- Tests --- + private User user; + private Settings settings; - @Test - void testFeedbackInitialization() { - LocalDateTime before = LocalDateTime.now(); - Feedback feedback = new Feedback(user, "Nice work!"); - LocalDateTime after = LocalDateTime.now(); + // -- Setup -- + @BeforeEach + public void setup() { + settings = new Settings(); // default anonymous = true + user = + new User("Name", "Valid@gmail.com", "123", Role.NORMAL_USER, new Settings(), new Inbox()); + } - assertNotNull(feedback.getFeedbackId()); - assertEquals("Nice work!", feedback.getComment()); - assertEquals(user, feedback.getUser()); + // --- Tests --- - // Date should be between before and after - assertTrue(!feedback.getDate().isBefore(before) && !feedback.getDate().isAfter(after)); - } + @Test + void testFeedbackInitialization() { + LocalDateTime before = LocalDateTime.now(); + Feedback feedback = new Feedback(user, "Nice work!"); + LocalDateTime after = LocalDateTime.now(); - @Test - void testAnonymousFlagWhenUserIsAnonymous() { - // user.settings.isAnonymous() == true → feedback.isAnonymous = false - settings = new UserSettings(true); - user = new User(settings); + assertNotNull(feedback.getFeedbackId()); + assertEquals("Nice work!", feedback.getComment()); + assertEquals(user, feedback.getUser()); - Feedback feedback = new Feedback(user, "Anonymous feedback"); + // Date should be between before and after + assertTrue(!feedback.getDate().isBefore(before) && !feedback.getDate().isAfter(after)); + } - assertFalse(feedback.isAnonymous()); - } + @Test + void testAnonymousFlagWhenUserIsAnonymous() { + // user.settings.isAnonymous() == true → feedback.isAnonymous = false + Feedback feedback = new Feedback(user, "Anonymous feedback"); - @Test - void testAnonymousFlagWhenUserIsNotAnonymous() { - // user.settings.isAnonymous() == false → feedback.isAnonymous = true - settings = new UserSettings(false); - user = new User(settings); + assertFalse(feedback.isAnonymous()); + } - Feedback feedback = new Feedback(user, "Not anonymous"); + @Test + void testAnonymousFlagWhenUserIsNotAnonymous() { + Feedback feedback = new Feedback(user, "Not anonymous"); - assertTrue(feedback.isAnonymous()); - } + assertTrue(feedback.isAnonymous()); + } - @Test - void testFeedbackIdIsUnique() { - Feedback f1 = new Feedback(user, "First"); - Feedback f2 = new Feedback(user, "Second"); + @Test + void testFeedbackIdIsUnique() { + Feedback f1 = new Feedback(user, "First"); + Feedback f2 = new Feedback(user, "Second"); - assertNotEquals(f1.getFeedbackId(), f2.getFeedbackId()); - } + assertNotEquals(f1.getFeedbackId(), f2.getFeedbackId()); + } - @Test - void testCommentStoredCorrectly() { - Feedback feedback = new Feedback(user, "This is a test comment"); + @Test + void testCommentStoredCorrectly() { + Feedback feedback = new Feedback(user, "This is a test comment"); - assertEquals("This is a test comment", feedback.getComment()); - } + assertEquals("This is a test comment", feedback.getComment()); + } - @Test - void testUserStoredCorrectly() { - Feedback feedback = new Feedback(user, "Hello"); + @Test + void testUserStoredCorrectly() { + Feedback feedback = new Feedback(user, "Hello"); - assertEquals(user, feedback.getUser()); - } + assertEquals(user, feedback.getUser()); + } - @Test - void testDateIsSet() { - Feedback feedback = new Feedback(user, "Testing date"); + @Test + void testDateIsSet() { + Feedback feedback = new Feedback(user, "Testing date"); - assertNotNull(feedback.getDate()); - } -} \ No newline at end of file + assertNotNull(feedback.getDate()); + } +} diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/SettingsTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/SettingsTest.java deleted file mode 100644 index 3221be5..0000000 --- a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/SettingsTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package ntnu.systemutvikling.team6.models; - -import ntnu.sytemutvikling.team6.models.Language; -import ntnu.sytemutvikling.team6.models.Settings; -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class SettingsTest { - - @Test - void testDefaultConstructorSetsStandardValues() { - Settings settings = new Settings(); - - assertTrue(settings.isLightMode()); - assertEquals(Language.ENGLISH, settings.getLanguage()); - assertFalse(settings.isAnonymous()); - } - - @Test - void testCustomConstructorSetsValuesCorrectly() { - Settings settings = new Settings(false, Language.ENGLISH, true); - - assertFalse(settings.isLightMode()); - assertEquals(Language.ENGLISH, settings.getLanguage()); - assertTrue(settings.isAnonymous()); - } - - @Test - void testConstructorThrowsExceptionWhenLanguageIsNull() { - assertThrows(IllegalArgumentException.class, - () -> new Settings(true, null, false)); - } - - @Test - void testToggleLightMode() { - Settings settings = new Settings(true, Language.ENGLISH, false); - - settings.toggleLightMode(); - assertFalse(settings.isLightMode()); - - settings.toggleLightMode(); - assertTrue(settings.isLightMode()); - } - - @Test - void testToggleAnonymousMode() { - Settings settings = new Settings(true, Language.ENGLISH, false); - - settings.toggleAnonymousMode(); - assertTrue(settings.isAnonymous()); - - settings.toggleAnonymousMode(); - assertFalse(settings.isAnonymous()); - } - - @Test - void testChangeLanguageSuccessfully() { - Settings settings = new Settings(); - - settings.changeLanguage(Language.ENGLISH); - assertEquals(Language.ENGLISH, settings.getLanguage()); - } - - @Test - void testChangeLanguageThrowsExceptionWhenNull() { - Settings settings = new Settings(); - - assertThrows(IllegalArgumentException.class, - () -> settings.changeLanguage(null)); - } -} \ No newline at end of file diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/SettingsTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/SettingsTest.java new file mode 100644 index 0000000..18b2814 --- /dev/null +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/SettingsTest.java @@ -0,0 +1,70 @@ +package ntnu.systemutvikling.team6.models.user; + +import static org.junit.jupiter.api.Assertions.*; + +import ntnu.sytemutvikling.team6.models.user.Language; +import ntnu.sytemutvikling.team6.models.user.Settings; +import org.junit.jupiter.api.Test; + +class SettingsTest { + + @Test + void testDefaultConstructorSetsStandardValues() { + Settings settings = new Settings(); + + assertTrue(settings.isLightMode()); + assertEquals(Language.ENGLISH, settings.getLanguage()); + assertFalse(settings.isAnonymous()); + } + + @Test + void testCustomConstructorSetsValuesCorrectly() { + Settings settings = new Settings(false, Language.ENGLISH, true); + + assertFalse(settings.isLightMode()); + assertEquals(Language.ENGLISH, settings.getLanguage()); + assertTrue(settings.isAnonymous()); + } + + @Test + void testConstructorThrowsExceptionWhenLanguageIsNull() { + assertThrows(IllegalArgumentException.class, () -> new Settings(true, null, false)); + } + + @Test + void testToggleLightMode() { + Settings settings = new Settings(true, Language.ENGLISH, false); + + settings.toggleLightMode(); + assertFalse(settings.isLightMode()); + + settings.toggleLightMode(); + assertTrue(settings.isLightMode()); + } + + @Test + void testToggleAnonymousMode() { + Settings settings = new Settings(true, Language.ENGLISH, false); + + settings.toggleAnonymousMode(); + assertTrue(settings.isAnonymous()); + + settings.toggleAnonymousMode(); + assertFalse(settings.isAnonymous()); + } + + @Test + void testChangeLanguageSuccessfully() { + Settings settings = new Settings(); + + settings.changeLanguage(Language.ENGLISH); + assertEquals(Language.ENGLISH, settings.getLanguage()); + } + + @Test + void testChangeLanguageThrowsExceptionWhenNull() { + Settings settings = new Settings(); + + assertThrows(IllegalArgumentException.class, () -> settings.changeLanguage(null)); + } +} diff --git a/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/UserTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/UserTest.java new file mode 100644 index 0000000..7bd0ff4 --- /dev/null +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/models/user/UserTest.java @@ -0,0 +1,164 @@ +package ntnu.systemutvikling.team6.models.user; + +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.UUID; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +class UserTest { + + @Nested + class constructorTests { + private final UUID validID = UUID.randomUUID(); + private final String validName = "Name"; + private final String validEmail = "Email@gmail.com"; + private final String validPassword = "Password"; + private final Role validRole = Role.NORMAL_USER; + private final Settings validSettings = new Settings(); + private final Inbox validInbox = new Inbox(); + + @Test + void shouldThrowIfIdIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + null, + validName, + validEmail, + validPassword, + validRole, + validSettings, + validInbox)); + } + + @Test + void shouldThrowIfNameIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, null, validEmail, validPassword, validRole, validSettings, validInbox)); + } + + @Test + void shouldThrowIfNameIsBlank() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, " ", validEmail, validPassword, validRole, validSettings, validInbox)); + } + + @Nested + class emailTests { + + @Test + void shouldThrowIfEmailIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, validName, null, validPassword, validRole, validSettings, validInbox)); + } + + @Test + void shouldThrowIfEmailIsBlank() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, validName, " ", validPassword, validRole, validSettings, validInbox)); + } + + @Test + void shouldThrowIfEmailDoesNotContainAt() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, + validName, + "test.gmail.com", + validPassword, + validRole, + validSettings, + validInbox)); + } + + @Test + void shouldThrowIfEmailDoesNotContainPeriod() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, + validName, + "test@gmailcom", + validPassword, + validRole, + validSettings, + validInbox)); + } + } + + @Test + void shouldThrowIfPasswordIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User(validID, validName, validEmail, null, validRole, validSettings, validInbox)); + } + + @Test + void shouldThrowIfRoleIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, validName, validEmail, validPassword, null, validSettings, validInbox)); + } + + @Test + void shouldThrowIfPasswordIsBlank() { + assertThrows( + IllegalArgumentException.class, + () -> + new User(validID, validName, validEmail, " ", validRole, validSettings, validInbox)); + } + + @Test + void shouldThrowIfSettingsIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User(validID, validName, validEmail, validPassword, validRole, null, validInbox)); + } + + @Test + void shouldThrowIfInboxIsNull() { + assertThrows( + IllegalArgumentException.class, + () -> + new User( + validID, validName, validEmail, validPassword, validRole, validSettings, null)); + } + + @Test + void shouldCreateUser() { + User user = + new User( + validID, validName, validEmail, validPassword, validRole, validSettings, validInbox); + + assertAll( + () -> assertEquals(validID, user.getId()), + () -> assertEquals(validName, user.getName()), + () -> assertEquals(validEmail, user.getEmail()), + () -> assertEquals(validRole, user.getRole()), + () -> assertEquals(validSettings, user.getSettings()), + () -> assertEquals(validInbox, user.getInbox())); + } + } +} diff --git a/helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/security/PasswordHasherTest.java b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/security/PasswordHasherTest.java similarity index 97% rename from helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/security/PasswordHasherTest.java rename to helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/security/PasswordHasherTest.java index 68a9409..dada18f 100644 --- a/helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/security/PasswordHasherTest.java +++ b/helpmehelpapplication/src/test/java/ntnu/systemutvikling/team6/security/PasswordHasherTest.java @@ -1,10 +1,10 @@ -package ntnu.sytemutvikling.team6.security; +package ntnu.systemutvikling.team6.security; + +import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - class PasswordHasherTest { private final PasswordHasher hasher = new PasswordHasher(); @@ -67,4 +67,4 @@ void shouldThrowIfStoredHashIsBlank() { assertThrows(RuntimeException.class, () -> hasher.isValidPassword("Password", " ")); } } -} \ No newline at end of file +} diff --git a/helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/models/user/UserTest.java b/helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/models/user/UserTest.java deleted file mode 100644 index 5fa92c8..0000000 --- a/helpmehelpapplication/src/test/java/ntnu/sytemutvikling/team6/models/user/UserTest.java +++ /dev/null @@ -1,218 +0,0 @@ -package ntnu.sytemutvikling.team6.models.user; - -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - -import java.util.UUID; - -import static org.junit.jupiter.api.Assertions.*; -import static org.junit.jupiter.api.Assertions.assertEquals; - -class UserTest { - - @Nested - class constructorTests { - private final UUID validID = UUID.randomUUID(); - private final String validName = "Name"; - private final String validEmail = "Email@gmail.com"; - private final String validPassword = "Password"; - private final Role validRole = Role.NORMAL_USER; - private final Settings validSettings = new Settings(); - private final Inbox validInbox = new Inbox(); - - @Test - void shouldThrowIfIdIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - null, - validName, - validEmail, - validPassword, - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfNameIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - null, - validEmail, - validPassword, - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfNameIsBlank() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - " ", - validEmail, - validPassword, - validRole, - validSettings, - validInbox - )); - } - - @Nested - class emailTests { - - @Test - void shouldThrowIfEmailIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - null, - validPassword, - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfEmailIsBlank() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - " ", - validPassword, - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfEmailDoesNotContainAt() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - "test.gmail.com", - validPassword, - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfEmailDoesNotContainPeriod() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - "test@gmailcom", - validPassword, - validRole, - validSettings, - validInbox - )); - } - } - - @Test - void shouldThrowIfPasswordIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - validEmail, - null, - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfRoleIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - validEmail, - validPassword, - null, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfPasswordIsBlank() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - validEmail, - " ", - validRole, - validSettings, - validInbox - )); - } - - @Test - void shouldThrowIfSettingsIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - validEmail, - validPassword, - validRole, - null, - validInbox - )); - } - - @Test - void shouldThrowIfInboxIsNull() { - assertThrows(IllegalArgumentException.class, () -> - new User( - validID, - validName, - validEmail, - validPassword, - validRole, - validSettings, - null - )); - } - - @Test - void shouldCreateUser() { - User user = new User( - validID, - validName, - validEmail, - validPassword, - validRole, - validSettings, - validInbox - ); - - assertAll( - () -> assertEquals(validID, user.getId()), - () -> assertEquals(validName, user.getName()), - () -> assertEquals(validEmail, user.getEmail()), - () -> assertEquals(validRole, user.getRole()), - () -> assertEquals(validSettings, user.getSettings()), - () -> assertEquals(validInbox, user.getInbox()) - ); - } - - } -} \ No newline at end of file diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class deleted file mode 100644 index 110f8b9c4ad1592f72a4edc10270d108662df524..0000000000000000000000000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Ym3WW7yg=swlO`(o;QNGel=+(KFuI@Onr*2n`k2&8U1Rky&` zOi5m=k3TDCfe{*73w@$t#N-aqDJCcHSsJZpX`-Gb>B+W%)&lqGIZL;nXhn#ukvaiO ze}|g>2<0uJUl84ob)Mkzw{dcgH#obcGegcygY&9%ras|X4MVAP4P&YC8WO2Y4QcXb zYnXmdMOraO&l&nYfjE^NMJG}2Bf?`uF-yBRi!^d{dO~}*g$e9n68p4!&oPC0LZy7N zSil3i5pAzo=AC4_QVK(^Fx6V5b3fXCQ<0E@VFeNY545ZFBLN;_ur7m6R%QvOK49n_ z9a=o9QY%SVme%}$dTEA7SR#+qun|0V9y}KaUJe8&&Vv^N!MQ+i`aF0!5WGT4Hq)Ly N4_*rduX@U?{Q;9ILF@nk diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Role.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/Role.class deleted file mode 100644 index 8d6c32ea9233165043bdc30cdfd4f45d6854a2b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1181 zcmb7DZBNrs6n^g7u4^f5OhlRZ!i&0&mpb3Rj1U$w1IYlh!ji=grW;o%c3sl7B!2TJ z=}3fVG<^0)8PDxzoIw+}q&+?Np69veJonl6AD_PgsNji;1Vh0O{mAOR3wb*VPu;hk z>mOMmciPXbcIS|LT`TJHz^ZjTu7N=|pdiUGw!2r`DOX<~*p(W?a`pdNN`fY3Koc~^ z=2p43z2As=#KxEb1LF+pV!d2FsMriEuSOx)kw!+vxPeJz8I+dS@j1g(-mIQDr;g=0 zG~QnGgtx+yjwxJMF>T-mZZb^#E~xlXn|e5Pyom3;VR)7wLT`Fbw_6%ou)}~vD-E9@ z2x9)6fm@hmNUpiQ8?G}<4^s`0+h#olMW^v|DQF_j8JNd{kRk4&%V6crk%XWle?jF< zx=4m})%E#q)Nb-%-)VZZvhkN*%u&>4$W}Wo$E!PmD<}uNvhTEsK6_OohRhBRk2{Ai zoq%dW9?)oVc1_!YCl9lsD_-lC>7uF_vw8h)amOHcFf8B?jH@L_v$caK+%7 zu=A?8?~Nj8=y$m1Ts0{MA}g(U&I2{-KT7xqWI}O=$|lgiS!4`7#`3& z8Sl{*lA#_V5!XMZC=hy<6)te?5=_)5{;1E>iqWrvi2`Ly^e6;-FG|TkkYchTMTxf5 z!qV(HW6El*P(DR} zz!x9XNJuo%M-x9v+-KS{mGptWoa^3e?X~tffBt^|31AbeVFVCVp+wP#euhOyIBvdi zB6!sm$JU{3Ic8pPqk2DIt-axPBkwkNJ+B*%=^7?yP&aqC^zFiPhP!%ixoZ)G5LOY1 zVgS)AQx~`pR8)hZf8BB{@rYqHQ|gtwlr2Uuh#?ijl0MEbd|(_Kd7FggUzQJeMKA<2 z*`kUOhO~dTZQI;5?5B0pt#U_fzN_#fVbz=vMj6K2zN9LKsHIW{>muZgp<%~6~itXbxZDBhl<#@DCw$=YdgQj5Gx3ya=2q0 zwUCBH%`|PU`-P7*PoB1GYswj{?2`iCwuxam(`)ClMTP-~zx6Q&tVRbhHLXMuCKrCh zQYPCg4MA9qi|QF7g_>Kh@Mo5EGuF0ZQMM9u)Qv&w>B6)_fU)tm;CbZlsrnTu)q$GL}5`6|LjkA=Ok}rs!E}9${u^O{&fbNKp}DDgrW)A$uWqj|9oHxTbx>#0RL#M<_w6&#$Vf zIfr4~>ChZ+RUkQ%2oh*3hw&IAc;YdRdCg5;Seqol{e&zf2Ehhtxrls=O3u=_KIz*hS_Hfn n%6MR-LqT5)kA5=lbxEH7d?|UWYw}W8=G0~87hRK=J&Kiod>1+S diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/User.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/user/User.class deleted file mode 100644 index e981ecb29753f548c70640e8cfa7b8d65e4f2e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3369 zcmb7G-E$LF6#v~e?WW1L#X!N*Rs$$$zM2AxU<$U-Vxy%Xp%E%5n`CXb-E2yBQ(&BN zeDTFUKnKPrpJc`dzfxvoM&EG8NBHia^#sjq3~TxG3V z(k*AQv4;M7cDm&r49=58cITe5cm3<8gj7%;y4P~8*VXdX3xd4W- zPr*wnLfF46AXh{{G3*Nz;iime)sGQ@iDj*%xA_W}E8#rLP5E(1K+Lk`Q5AQ+HdN6GjEX_A3g1=0&8%`l(mBoWrEVz^Ybop9ZBI5HcN zhmom>A4dfCUn`sKLHcn_;80d~9LnBqGw#Rh0tYfyzI?y!%K##nR1j4WLtG$cIaW1g zKXCL?)!8;SO){2pbggtcRVo*C(@s@wy^>m?hd_@}Bv@VOtBzr&R#r0eX||YDF@=sd6f3!vcSv> zQrT|hG8gEIimUj5kT&d`W*WsN(vc2G?*%%#%2s*>{;rERiMUs|tCQ!`WKS`=#H#^% zm+~&Y(Ht@4A~hX>vt(HMas~EhmANrhigT_#|eBvff6N@~0 z3Jhi)t+07n+mZ$q+@emDgS7#wf{(i%63kZxcLb)ogVcjbL0%x$1WXAk^pU4JO+fFnyq4bs$@=RtowhgE1Lk z%1kjMaD?Vq4_*9zx&>)u(<;O_2)%oF^vgF5clo9%D8JLtlW!Vc@=e2s-YTem$kOvV zAihB_*#sWPos|*Z)5Qqj>i%;Bx1=Lrei&2pK`A5&kZDZd1Yc{ICyZ*ckpT3|!>cl2t||%C0~XNnDVn>I1KDlJ-vk$k<{7)Z5 z-5@G0w$+AhRnm_svemG7uWm6(NsMz6)Ua`{VdJ|RcFF6(>Grg$)KA;gPxqZ!6;I!^im@f5Zy|g$h;_kT}EdS6*%cbw&VE}?papvX| TT>Ay5IAGDz3&XT?q=V{z(EAya diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/security/PasswordHasher.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/security/PasswordHasher.class deleted file mode 100644 index e454773c8dd1e84d32bd2397f0695b732674173c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2772 zcmb7`*Xqe#4gr)mxm;az| zed~)4T|OV6#ZP_fL;s<^wf)`6LQs6@2R<`r=AL`*Io~-;{`%+lKLGUNyD)0t)8N+; zKu{q1$XGIxIm5~%Z_hrGX;&b4-Ly=%Q^42II2lF=wHm@YBG9*~kGr;MWdtZV4PMo>9>nSL$-iu;%g$9bwetn1Srl8cxx^+Ov{O+pCLiKItsVbaFJ+J1AGjDJs}! zbezRGfry*$&Kh=?Z5yis{)WbxZXd+cAHq0^CPm~t&uEzGo=FW1C<@I2`$kiPJ$;w& znQpd!!AOtycU`{P7Df^mHC)nh8La~K+s*0*U^SzaLFo_(?wTpA{)ezhG88exGiwV%c~s} z2~>K~P2|hfcR;09m4~Ie&~Qg!uV=@r?MmHg7%wNTw=h<)TysHI) zC7K6#sNp>w24;6cQ!x{q^9(XOsy|}6Ps}hA<{&l9>&PH0aKwXC$-`mkI7UYHm>KD? z2ePU4J}DSEN(4;A(;++(NK}JaGIHje;l9MC9zLdCH$xNHJ!D#Pq_8k6?FmIeAU2dw z8@WltHq~?KrQgk(>=La*|GR5-@C>HBYGLJeCUADA_^Uoj2?@P)j2vUFnMo;`{YT)K zr&lTNm--Wr)8@;a;`nyeSNZ^Ls?=eDsavTN3NqMV&x;_1 zC_Ss^uZCmTj}u%y!>6-2jYeEU6FPAoLug?uN#Z^(B8yh;Z=;1PDBvnSrIw2RK1X{! zCg5Mvu3D2Hfym8(J8I*#`#Y1E0}1ANFGq*EfNq>u2i=jkJSLaBzQ zfS&mywg0ls@K@164I%zRXc&!9^E2)#vc5t4wbXXDSOG|89%ODQ5VtufM{yH(I7ue>cNY(Fk2|Lbc-jLxk1+MeJWxJwmqP33z7`K{fVrZ(#0Yo-YKedj> lzv6((eNmPBd#Umj-__tLzUDnfX^<1-8-9fcynl<@{{WZ#th@jK diff --git a/helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest$constructorTests$emailTests.class b/helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest$constructorTests$emailTests.class deleted file mode 100644 index 51a8c3c7dae55e114272893cb6e906b851d467b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3560 zcmbtWYgZFT7=DJ^hPX(K)`GPbX|xcO#a`?swi<2{8zUtN*4o-`k^vSrJ7ISg#ZUc9 zJ;xqBdQN{pPe1hs_4J+HK!TF696n@c-pM=9^Uiyl`TM`ue*sv)a}7NVw;k#DhPNwu z-IqJomTfufhU8}brcoC)ZhMCBan~r*r^G#(stU)Gu3wcRki9ti(63=YhlUu#nN4%Y zG<<2<#)HZxuS$>Mw9B`B%jE^(6nxuexH^#!)NGTuLbc4~yGw(JW z%enbX3{wn!1+&g$xXv&nDTnT?t8A)@dJG0bY?+SpRJb*Tctgjh_>5sNKwJ?v#qCCELozR_roC#qmXe!`eX2t-$EbF;Zg^u z7s%YAapdaec;-&oE@>njeHP0A~V-a^`_WmI7NxslKyGG zHJY13+m=kHW^*r<7h=nAbZ6g;$=Q0QXxL%6(n`()h8{e=2I}aSx~tMdB=i-=C`buDWuT#P`QczJ*_D2JdMEp4xpD0 z2Q3lUlOsV39YDtq2dxmOeI)3E4xk?&4%#5l=iNaQJ*vin`(Od2ZHP);1wdH^6pM{`xs=^Bgm+;bSKLm zgRFc688x*gS*hv9^Z_@rV{qMV<4V8nMfBq#d9(*VVlR&$k^EDz_87m=m?nR3QSm*& juk;INmHiptpKZ|0CH)Je%kUT;&EqtaH2QdoU5x$@t(>{* diff --git a/helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest$constructorTests.class b/helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest$constructorTests.class deleted file mode 100644 index e7def3c7dea39376de39934c3b6c605f9dc1b659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6802 zcmbtY`F|8=8UId5vdLxwVS%=xNNC+cvT0e4g4RVKq(M?cKo)|CS|__hSeV@jyR#f# z#iP}##kSQZ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&@JV<8dVTssPL1I-`v5#EjmIcXGou;nFDwM>4hy@z&cywcJRj(JA zr9lQ&Voe01X|r6+=v#A=K{_iDyHXC9v+IQ0D8o(9(#6_@+Gdul2)-J+|E(xtR@h>i z7Ox)Kq>~;>T~Oz>;DIQc;wcsP+1wf7rd52w=FSRtPQ~YK?jhkGR`EHT`?he8sQ9eS zeOI{eskqnXzAxMlRD8zfek9yuDn4yctw;!Q5Eo9{1N!capPD+jt!`^iq7pG!K_2{e{&nOukY(W8&@;lkCZ=ksE%{QQ3H| zzpHhT2Q|Y;vlFMUsKbSVUbI_fo$0^p!dqtqe^YQnxc;N!LN!;{xGuL#DF;*$tuhh( zlTln};WM{0f`8NV8;i0SI(v_0JoGl+Xd;No<(pJYZp7^5-%7d(-Q;=0_4pq0yv%xh zoILN6_B>t!?Kf{?d<#|w-bReKle(QZf+oJV^zWO7vUhLd3?hkXbWUMGBGx^H%M-Dl zDO{0=#iy`5aT(q%!Jv0h{N7nXKU4?w6~Um)=lJ@p zpdYRSx+@s;48!K#;e{xm$3{y%2;~><9Nii!OX;=nWxRW(TT0MGi6RWEYIKLq(MN;LC* zH*s0P0&v$6w-A8)OlVxz$pG9Waf<=CPlv{3HFj|~@-6!ijr9=qXaMSYA8ORwg=oMo zu;SOCb`$mW0jN)fMrBvwqWaHl0de0HfcvBmxAB>=cX4sI(uw7~mjpYpLJ#)kUdK14 zZ9PujUE=PF-y_&3&5o|P@lk_*-z@0t$z1ed*Y=(nwx1-hKLBeK-0f4)6JS1Dz{ci_ z>6P%VK|kd~5852In=bk`*Zie^^98%1^(TG!O9QNDb6algdbYqp>NhklX1-h?lCx$(>7zhZy8ACd!4v1j=W zbL?r>m(wowphtbfqrT};-}0#Mc+{gF^+S*Pu}A&Xqn`4pXFTdTkNPF4Khvhgv}Ymi T$6rYQmDJz){s;br|DgN-7mm4y diff --git a/helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest.class b/helpmehelpapplication/target/test-classes/ntnu/sytemutvikling/team6/models/user/UserTest.class deleted file mode 100644 index 810d4b9c1a1ad74452dac74f086ad3201173e017..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 571 zcmbtRyG{c!5F95V2YHZ?@G2=%00pL^0YMRg1PY-5(mRI*4nCiB_C?~esE{c506q#a z7eGjK5w^TLJ6_Ftz3(5dZvalQSwjis2$cpFP!(uT)Kp2U+`YUSPjnmvsz=6|a4b;X z-Wf$$6xegY<O=OD5j?AeX$oTkR?Z25qRrg z>N#n{$wPlYPk&QSW+fR50<`d8X=iumo69#d*5CiW`wPH4*5hbHyM_)Oo#q*1RzF6N973nhcIO3IOIHG7xzo!7;-PW%w6}j?Nk@JTNBQzaAjswNF_B-)E+~ZtQl_R zHp6t`T&TG?deEyOsiO}mhUC$B$iySVGUOA6_VJ0bhL0Gowl3vOQ*3f`#@Y1h!jkj5 z715A}ZKWuwgE}taV+Kv^Qdm+j?2ez$%j06FMBC10cFQB@=-Du&aI(B%WH&skqFl(% z`)2vNDJaTejA$6uaS3A#>EktLTvs?smAKZ401{Sfj{Ta%Qk3aAlMZudFdwZ6AJKOz z1%|)@j~IH7 z)asE=DM^P){!picTZ*Twj@!6HAOQnKTh71oxJe}3h>{R=W$wdnn<&R{kAbBbzBp&S z+?08Dg#T=P37dQZA(`=yb%!SCXwpx#EUrn5iIL?=1VI|D(RRb zsSDr6QO25v?{vJx_lIVzVeQ!4B3tltLx6mPSETLiF+apv8>@N}trf@R_ z+ursX(Vht@h>&tfadodDqSycbVPNuf-RM{hk>|K+mS~hyKJ~n13CEwcf(pO?$V^dX ztKnxVnilzo+&dh!hF^)p)34GP4Kjo@QPV?zVJw+c|Jk(aqF*0AqmP99w3`Dx<>;orlqH{Yzad zOTH%wFXeLpNUd48xDA@oWJ%eVrWA*0*6 zleA83UUuvw^-xo3wau0CqolxydbiOttcgrWUI+VvM23 zE~(boJ%-2GOQEL1=to3CRK@^e4AI8@5XDnfSM5cH&ctNC7gzC-gljUc<70-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