Skip to content

Get updated classes and unitTests. #42

Merged
merged 70 commits into from
Mar 5, 2026
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
8e9a69f
Added User class
Feb 19, 2026
d3ce9d4
Added Settings class
Feb 19, 2026
6e4393d
Added Inbox class
Feb 19, 2026
806dbbc
Added javadoc to Inbox
Feb 19, 2026
9cd4106
Added Message class
Feb 19, 2026
9b82784
Added exeption handling for Message class
Feb 20, 2026
73fdb9e
Added findMessageById in inbox
Feb 20, 2026
b143d6a
Added exeption handling to Inbox
Feb 20, 2026
80c40a8
Added methods to Setting. Created Language enum.
Feb 20, 2026
f0b81dd
Added Role enum
Feb 24, 2026
b13239b
Delete docs/Use_Case/1
cathrkri Feb 24, 2026
393197d
Add files via upload
cathrkri Feb 24, 2026
05cb209
Delete docs/Use_Case/Temp_user_case.png
cathrkri Feb 24, 2026
0166c0c
Add files via upload
cathrkri Feb 24, 2026
da56be3
Ignore Maven target directory
Feb 24, 2026
b9b452f
push
Feb 24, 2026
28d21d0
Add files via upload
cathrkri Feb 24, 2026
6cc3bbb
Added getters and setters to User
robinsp Feb 25, 2026
7cfde3b
Modifications: Registry classes implemented
Mar 3, 2026
14e82dd
Modifications: Registry classes
Mar 3, 2026
6929afa
Merge pull request #31 from cathrkri/28-userregistry-charityregistry-…
meenaksj Mar 3, 2026
d391df4
gitignore
Mar 3, 2026
3d26e35
gitignore
Mar 3, 2026
dc7f052
Merge pull request #32 from cathrkri/hotfix
apbaluna Mar 3, 2026
cd38381
fix: Correct getters in DonationRegistry
Mar 3, 2026
fd7687a
Merge Conflict: Attempt to Solve
Mar 3, 2026
17fb80c
Merge Conflict: Models are correct
Mar 3, 2026
05cb45b
Merge pull request #29 from cathrkri/project-setup
apbaluna Mar 3, 2026
c8d9e6c
Fix: Saved IntelliJ confiqs and added .idea in the helpmehelpapplicat…
Mar 3, 2026
67aecfc
Merge pull request #33 from cathrkri/hotfixService
apbaluna Mar 3, 2026
a0e69df
Create 1
cathrkri Mar 3, 2026
9308dcc
Add files via upload
cathrkri Mar 3, 2026
c7c6a05
Delete docs/sequence_diagram/1
cathrkri Mar 3, 2026
b9c8aae
Add files via upload
cathrkri Mar 3, 2026
1362645
Delete docs/Møtedokumenter/Thursdays Meeting 5.02.2026 (With LA).pdf
cathrkri Mar 3, 2026
70efb0a
Add files via upload
cathrkri Mar 3, 2026
0a4721e
Added getHashPassword to PasswordHasher
robinsp Mar 3, 2026
eed6f98
Added isValidPassword to PasswordHasher
robinsp Mar 3, 2026
9b9d8ea
Added password hashing to User
robinsp Mar 3, 2026
ab2de3d
Added Junit tests to PasswordHasher
robinsp Mar 3, 2026
ab584ac
Feat: Added file (CharityTest) and repo structure for UnitTesting
Mar 3, 2026
5ed46ad
Added exeption handling in User
robinsp Mar 3, 2026
7e62703
Feat: Added UnitTest for Charity class with JavaDoc
Mar 3, 2026
1bb6914
Added Junit tests to User
robinsp Mar 3, 2026
db8bb74
Merge pull request #34 from cathrkri/feature/password-hashing
robinsp Mar 3, 2026
8a43cfa
Wrote javadoc to User
robinsp Mar 3, 2026
654e852
Merge pull request #35 from cathrkri/feature/password-hashing
robinsp Mar 3, 2026
30c5e48
Feat: Added UnitTest for CharityRegistry class
Mar 4, 2026
0baccdd
Feat: Added JavaDoc for when necessary in CharityRegistry in Test class
Mar 4, 2026
7d6fe90
Attempt Feat: DonationTest but User is fully developed
Mar 4, 2026
7fa8603
Feat: Added SettingsTest
Mar 4, 2026
d3565a3
Fix: Better naming conventions
Mar 4, 2026
9b40a55
feat: added workflow
robinsp Mar 5, 2026
e3f4b4a
feat: workflow added for testing if runners are working
robinsp Mar 5, 2026
84a2b13
mv .github folder to root
robinsp Mar 5, 2026
a43a8ed
chore: changed README programming lanugauge docs to java 25
robinsp Mar 5, 2026
b5e7385
Add CI workflow
robinsp Mar 5, 2026
4ef68e8
Fix: Simpler definisjon of Anonymous
Mar 5, 2026
b13d42d
Fix: Added FeedbackTest
Mar 5, 2026
9c68af3
Merge branch 'main' of git.ntnu.no:cathrkri/systemutviklingTeam6 into…
Mar 5, 2026
b2c1072
Merge: Clean up before merge
Mar 5, 2026
e2161b7
Merge: Merge with feat/workflow
Mar 5, 2026
40c5bed
Fix: Package Placement
Mar 5, 2026
98feae9
Fix: Package Placement
Mar 5, 2026
6c3f7eb
Fix: Fixed tests based on User being able to create their own id on c…
Mar 5, 2026
2408d90
Fix: Anonymous has correct contructor
Mar 5, 2026
3ab00df
Fixes: All current Tests are valid
Mar 5, 2026
afa366b
Feature: gitignore for better workflow
Mar 5, 2026
23110a0
Fix: Hotfixes and better Anonymous handling
Mar 5, 2026
ca87572
Merge pull request #41 from cathrkri/unitTesting
apbaluna Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "25"
cache: maven

- run: mvn -B test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Adrian
.vscode/
.idea/
.target/
.helpmehelpapplication\target/
.helpmehelpapplication\.idea/
9 changes: 0 additions & 9 deletions .idea/Prosjekt-Repo.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Planned core functionalities (3–4 will be fully implemented):


## Technology Stack
- **Programming Language:** Java
- **Programming Language:** Java 25
- **Application Type:** Desktop application
- **UI:** JavaFX
- **Database:** Relational database
Expand Down
Binary file added docs/Møtedokumenter/Team Meeting 1.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion docs/Use_Case/1

This file was deleted.

Binary file added docs/Use_Case/Organization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Use_Case/Use_Case_uml.docx
Binary file not shown.
File renamed without changes
Binary file added docs/sequence_diagram/Org_Onboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sequence_diagram/Organization_message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions helpmehelpapplication/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci

on:
push:
branches: main
pull_request:
branches: main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribition: temurin
java-version: "25"
cache: maven
- run:
mvn -B test
2 changes: 2 additions & 0 deletions helpmehelpapplication/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
target/
File renamed without changes.
15 changes: 15 additions & 0 deletions helpmehelpapplication/.idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
7 changes: 7 additions & 0 deletions helpmehelpapplication/.idea/dictionaries/project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
6 changes: 2 additions & 4 deletions .idea/misc.xml → helpmehelpapplication/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml → helpmehelpapplication/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions helpmehelpapplication/helpmehelpapplication.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ntnu.sytemutvikling.team6;

public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
Original file line number Diff line number Diff line change
@@ -1,98 +1,95 @@
/**
* This class represents a charity organization. It contains information about the charity such as its name, description, total donations, verification status, and category.
*
* This class represents a charity organization. It contains information about the charity such as
* its name, description, total donations, verification status, and category.
*
* @author Adrian Balunan
*/
package ntnu.sytemutvikling.team6.models;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.ArrayList;

abstract class Charity {
/* UUID for uniquely identifying each charity */
private UUID id;

/* Name of the charity */
private String name;

/* Description of the charity's mission and activities */
private String description;

/* Total Donations received */
private int totalDonations;

/* Is the charity verified? */
private boolean isVerified;

/* Category for the charity */
private String category;

/* List that contains the charity's Feedbacks */
private List<Feedback> feedbacks;

/**
* Konstructor for creating a new charity.
* The ID is generated automatically using UUID.
* Total donations are initialized to 0.
* The charity is unverified by default.
*
* @param name
* @param description
* @param category
*/
public Charity(String name, String description, String category) {
this.id = UUID.randomUUID();
this.name = name;
this.description = description;
this.totalDonations = 0;
this.isVerified = false;
this.feedbacks = new ArrayList<>();
this.category = category;
}

/**
* Getters for the charity's attributes.
*/
public UUID getId() {
return id;
}
public String getCategory() {
return category;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public int getTotalDonations() {
return totalDonations;
}
public boolean isVerified() {
return isVerified;
}

/**
* Setter for verification status.
* This one sets the charity as verified.
*/
public void setVerified() {
this.isVerified = true;
}

/**
* Setter for verification status.
* This one sets the charity as unverified.
*/
public void setUnverified() {
this.isVerified = false;
}

/**
* Setter for total donations. This method is used to update the total donations when a new donation is made.
*/
public void setTotalDonations(int amount) {
this.totalDonations += amount;
}
public class Charity {
/* UUID for uniquely identifying each charity */
private UUID id;

/* Name of the charity */
private String name;

/* Description of the charity's mission and activities */
private String description;

/* Total Donations received */
private int totalDonations;

/* Is the charity verified? */
private boolean isVerified;

/* Category for the charity */
private String category;

/* List that contains the charity's Feedbacks */
private List<Feedback> feedbacks;

/**
* Konstructor for creating a new charity. The ID is generated automatically using UUID. Total
* donations are initialized to 0. The charity is unverified by default.
*
* @param name
* @param description
* @param category
*/
public Charity(String name, String description, String category) {
this.id = UUID.randomUUID();
this.name = name;
this.description = description;
this.totalDonations = 0;
this.isVerified = false;
this.feedbacks = new ArrayList<>();
this.category = category;
}

/** Getters for the charity's attributes. */
public UUID getId() {
return id;
}

public String getCategory() {
return category;
}

public String getName() {
return name;
}

public String getDescription() {
return description;
}

public int getTotalDonations() {
return totalDonations;
}

public boolean isVerified() {
return isVerified;
}

/** Setter for verification status. This one sets the charity as verified. */
public void setVerified() {
this.isVerified = true;
}

/** Setter for verification status. This one sets the charity as unverified. */
public void setUnverified() {
this.isVerified = false;
}

/**
* Setter for total donations. This method is used to update the total donations when a new
* donation is made.
*/
public void setTotalDonations(int amount) {
this.totalDonations += amount;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package ntnu.sytemutvikling.team6.models;

import java.util.*;

public class CharityRegistry {
private final List<Charity> charities;

public CharityRegistry() {
this.charities = new ArrayList<>();
}

public List<Charity> getAllCharities() {
return Collections.unmodifiableList(charities);
}

public Optional<Charity> findCharityById(UUID charityId) {
if (charityId == null) {
throw new IllegalArgumentException("CharityId can not be null.");
}
return charities.stream().filter(charity -> charityId.equals(charity.getId())).findFirst();
}

public void addCharity(Charity charity) {
if (charity == null) {
throw new IllegalArgumentException("Charity can not be null.");
}
charities.add(charity);
}

public boolean removeCharity(UUID charityId) {
if (charityId == null) {
throw new IllegalArgumentException("CharityId can not be null.");
}
return charities.removeIf(charity -> charityId.equals(charity.getId()));
}
}
Loading
Loading