Skip to content

Commit 88edd33

Browse files
committed
fix: adds spotlessApply. lesson_16 -JosephCaballero
1 parent a05482a commit 88edd33

File tree

2 files changed

+12
-6
lines changed
  • lesson_16/objects/objects_app/src

2 files changed

+12
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public void bout(Boxer boxer) throws BoxerIsRetiredException {
129129
public void setName(String name) {
130130
this.name = name;
131131
}
132+
132133
public void setHealth(int health) {
133134
this.health = health;
134135
}

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import static org.junit.jupiter.api.Assertions.assertEquals;
55
import static org.junit.jupiter.api.Assertions.assertFalse;
66
import static org.junit.jupiter.api.Assertions.assertNotEquals;
7-
import org.junit.jupiter.api.BeforeEach;
8-
import org.junit.jupiter.api.Test;
97

108
import com.codedifferently.lesson16.boxer.Boxer.BoxerHasNoFightsException;
119
import com.codedifferently.lesson16.boxer.Boxer.BoxerIsRetiredException;
10+
import org.junit.jupiter.api.BeforeEach;
11+
import org.junit.jupiter.api.Test;
1212

1313
public class BoxerTest {
1414

@@ -31,8 +31,10 @@ void testRest_restingToIncreaseHealth() {
3131
boxer.rest();
3232
assertNotEquals(boxer.getHealth(), previousHealth);
3333
}
34+
3435
@Test
35-
void testGetFightHistory_makingAFighterToHaveABout() throws BoxerHasNoFightsException, BoxerIsRetiredException {
36+
void testGetFightHistory_makingAFighterToHaveABout()
37+
throws BoxerHasNoFightsException, BoxerIsRetiredException {
3638
Boxer mike = new Boxer("mike", 1000, 1000);
3739
boxer.bout(mike);
3840
assertEquals("You fought " + mike.getName() + " L", boxer.getFights());
@@ -57,14 +59,16 @@ void testBout_makingNewBoxerToFightAnotherAndSeeTheResults() throws BoxerIsRetir
5759
}
5860

5961
@Test
60-
void testBout_makingNewBoxerToFightAndDraw() throws BoxerIsRetiredException, BoxerHasNoFightsException {
62+
void testBout_makingNewBoxerToFightAndDraw()
63+
throws BoxerIsRetiredException, BoxerHasNoFightsException {
6164
Boxer ryan = new Boxer("Ryan Garcia", 99, 99);
6265
boxer.bout(ryan);
6366
assertEquals(boxer.getFights(), "You fought Ryan Garcia D");
6467
}
6568

6669
@Test
67-
void testBout_makingNewBoxerToWinAgainstWithBoxer() throws BoxerIsRetiredException, BoxerHasNoFightsException {
70+
void testBout_makingNewBoxerToWinAgainstWithBoxer()
71+
throws BoxerIsRetiredException, BoxerHasNoFightsException {
6872
Boxer hitman = new Boxer("Thomas Hearns", 98, 98);
6973
boxer.bout(hitman);
7074
assertEquals(boxer.getFights(), "You fought " + hitman.getName() + " W");
@@ -128,7 +132,8 @@ void testSetHealth() {
128132
}
129133

130134
@Test
131-
void testBoxerIsRetiredException_retiringBoxerThenThrowingException() throws BoxerIsRetiredException {
135+
void testBoxerIsRetiredException_retiringBoxerThenThrowingException()
136+
throws BoxerIsRetiredException {
132137
Boxer leaonard = new Boxer("Sugar ray", 200, 200);
133138
boxer.retire();
134139
assertThatThrownBy(

0 commit comments

Comments
 (0)