Skip to content

Commit

Permalink
FIX unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
culmat committed Jan 23, 2024
1 parent 1f907a5 commit 89a4049
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/java/com/baloise/funorg/TeamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.text.ParseException;
Expand All @@ -17,30 +18,29 @@ public void parseFAADTEAMBBEDevOpsSystemTeamINTERNAL() throws ParseException {
assertEquals("DevOpsSystemTeam", team.name());
assertTrue(team.internal());
}

@Test
public void parseFAADTEAMGITDevOpsSystemEXTERNAL() throws ParseException {
Team team = Team.parse("F-AAD-TEAM-OTHER-ATEAM-EXTERNAL");
assertEquals("OTHER", team.unit());
assertEquals("ATEAM", team.name());
assertFalse(team.internal());
}

@Test
public void parseFAADTEAMBCHITDevOpsComplianceINTERNAL() throws ParseException {
Team team = Team.parse("F-AAD-TEAM-A-UNIT-ATEAM-INTERNAL");
assertEquals("A-UNIT", team.unit());
assertEquals("ATEAM", team.name());
assertTrue(team.internal());
}

@Test
public void parseFAADTEAMBCHIntegrationSecurity() throws ParseException {
Team team = Team.parse("F-AAD-TEAM-BCH-Integration & Security");
assertEquals("BCH", team.unit());
assertEquals("Integration & Security", team.name());
assertTrue(team.internal());
Exception exception = assertThrows(ParseException.class, () -> {
Team.parse("F-AAD-TEAM-BCH-Integration & Security");
});
assertEquals("F-AAD-TEAM-BCH-Integration & Security dos not contains the minimum of 5 seperators: -", exception.getLocalizedMessage());
}


}

0 comments on commit 89a4049

Please sign in to comment.