Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
Fix test case in TagTest.java.
  • Loading branch information
HanB1n committed Oct 9, 2024
1 parent 2c8d3a9 commit a43b61d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/test/java/seedu/address/model/tag/TagTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,30 @@ public void isValidTagName() {
assertThrows(NullPointerException.class, () -> Tag.isValidTagName(null));
}

@Test
public void canBeDeleted() {
Tag florist = FLORIST;
assertTrue(FLORIST.canBeDeleted());
}

@Test
public void noPersonsTaggedCheck() {
Tag florist = FLORIST;
assertEquals(0, FLORIST.getNumberOfPersonsTagged());
Tag florist = new Tag(new TagName("Florist"));
assertEquals(0, florist.getNumberOfPersonsTagged());
}

@Test
public void incrementTaggedCount() {
Tag florist = FLORIST;
Tag florist = new Tag(new TagName("Florist"));
florist.increaseTaggedCount();
assertEquals(1, florist.getNumberOfPersonsTagged());
}

@Test
public void decrementTaggedCount() {
Tag florist = FLORIST;
Tag florist = new Tag(new TagName("Florist"));;
florist.increaseTaggedCount();
florist.decreaseTaggedCount();
assertEquals(0, florist.getNumberOfPersonsTagged());
}

@Test
public void canBeDeleted() {
Tag florist = new Tag(new TagName("Florist"));
assertTrue(florist.canBeDeleted());
}
}

0 comments on commit a43b61d

Please sign in to comment.