Skip to content

Commit 2d71735

Browse files
committed
chore: applied spotlessApply and adadjusted tests. lesson_16 -JosephCaballero
1 parent 76f0c6c commit 2d71735

File tree

2 files changed

+5
-5
lines changed
  • lesson_16/objects/objects_app/src

2 files changed

+5
-5
lines changed

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/boxer/Boxer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public String getFights() throws BoxerHasNoFightsException {
106106
for (Map.Entry<String, Character> entry : fights.entrySet()) {
107107
String key = entry.getKey();
108108
char value = entry.getValue();
109-
fightsHad += "You fought " + key + " " + value +"\n";
109+
fightsHad += "fought: " + key + " " + value + ".";
110110
}
111111
return fightsHad;
112112
}

lesson_16/objects/objects_app/src/test/java/com/codedifferently/lesson16/boxer/BoxerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void testGetFightHistory_makingAFighterToHaveABout()
3737
throws BoxerHasNoFightsException, BoxerIsRetiredException {
3838
Boxer mike = new Boxer("mike", 1000, 1000);
3939
boxer.bout(mike);
40-
assertEquals("You fought " + mike.getName() + " L", boxer.getFights());
40+
assertEquals("fought: " + mike.getName() + " L.", boxer.getFights());
4141
}
4242

4343
@Test
@@ -63,15 +63,15 @@ void testBout_makingNewBoxerToFightAndDraw()
6363
throws BoxerIsRetiredException, BoxerHasNoFightsException {
6464
Boxer ryan = new Boxer("Ryan Garcia", 99, 99);
6565
boxer.bout(ryan);
66-
assertEquals(boxer.getFights(), "You fought Ryan Garcia D");
66+
assertEquals(boxer.getFights(), "fought: Ryan Garcia D.");
6767
}
6868

6969
@Test
7070
void testBout_makingNewBoxerToWinAgainstWithBoxer()
7171
throws BoxerIsRetiredException, BoxerHasNoFightsException {
7272
Boxer hitman = new Boxer("Thomas Hearns", 98, 98);
7373
boxer.bout(hitman);
74-
assertEquals(boxer.getFights(), "You fought " + hitman.getName() + " W");
74+
assertEquals(boxer.getFights(), "fought: " + hitman.getName() + " W.");
7575
}
7676

7777
@Test
@@ -88,7 +88,7 @@ void testRollSkillSet_testingBasicIsNotWhatIsRolled() {
8888
@Test
8989
void testAddFights() throws BoxerIsRetiredException, BoxerHasNoFightsException {
9090
boxer.addFights("Marvin Hagler", 'L');
91-
assertEquals(boxer.getFights(), "You fought Marvin Hagler L");
91+
assertEquals(boxer.getFights(), "fought: Marvin Hagler L.");
9292
}
9393

9494
@Test

0 commit comments

Comments
 (0)