Skip to content

Commit c650712

Browse files
chore: spotlessApply
1 parent 2956c7b commit c650712

File tree

1 file changed

+28
-20
lines changed
  • lesson_16/objects/objects_app/src/test/java/com/codedifferently/lesson16/xaviercruz

1 file changed

+28
-20
lines changed
Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,74 @@
11
package com.codedifferently.lesson16.xaviercruz;
22

3-
import java.util.ArrayList;
4-
import java.util.Arrays;
5-
63
import static org.junit.jupiter.api.Assertions.assertEquals;
74
import static org.junit.jupiter.api.Assertions.assertThrows;
5+
6+
import java.util.ArrayList;
7+
import java.util.Arrays;
88
import org.junit.jupiter.api.Test;
99

1010
public class PersonTest {
11-
Person person = new Person("That one guy right there", 25, Position.ARSONIST, new ArrayList<>(Arrays.asList("Tall", "Insane", "Funny", "something else here idk")), Color.RED);
11+
Person person =
12+
new Person(
13+
"That one guy right there",
14+
25,
15+
Position.ARSONIST,
16+
new ArrayList<>(Arrays.asList("Tall", "Insane", "Funny", "something else here idk")),
17+
Color.RED);
1218

1319
@Test
14-
public void testGetName(){
20+
public void testGetName() {
1521
assertEquals("That one guy right there", person.getName());
1622
}
1723

1824
@Test
19-
public void testChangeName(){
25+
public void testChangeName() {
2026
person.changeName("new name right here bruh");
2127
assertEquals("new name right here bruh", person.getName());
2228
}
2329

2430
@Test
25-
public void testGetAge(){
31+
public void testGetAge() {
2632
assertEquals(25, person.getAge());
2733
}
2834

2935
@Test
30-
public void testGetPosition(){
36+
public void testGetPosition() {
3137
assertEquals(Position.ARSONIST, person.getPosition());
3238
}
3339

3440
@Test
35-
public void testGetTraits(){
36-
assertEquals(new ArrayList<>(Arrays.asList("Tall", "Insane", "Funny", "something else here idk")), person.getTraits());
41+
public void testGetTraits() {
42+
assertEquals(
43+
new ArrayList<>(Arrays.asList("Tall", "Insane", "Funny", "something else here idk")),
44+
person.getTraits());
3745
}
3846

3947
@Test
40-
public void testGetEyeColor(){
48+
public void testGetEyeColor() {
4149
assertEquals(Color.RED, person.getEyeColor());
4250
}
4351

4452
@Test
45-
public void testIncreaseAge(){
53+
public void testIncreaseAge() {
4654
person.increaseAge();
4755
assertEquals(26, person.getAge());
4856
}
4957

5058
@Test
51-
public void testUpdateAge(){
59+
public void testUpdateAge() {
5260
person.updateAge(99);
5361
assertEquals(99, person.getAge());
5462
}
5563

5664
@Test
57-
public void testAddToTraits_Exception(){
58-
String[] newTraits = new String[]{"test", "test", "test", "test", "test", "test", "test"};
59-
assertThrows(TooManyTraitsException.class, () -> {
60-
person.addToTraits(newTraits);
61-
});
65+
public void testAddToTraits_Exception() {
66+
String[] newTraits = new String[] {"test", "test", "test", "test", "test", "test", "test"};
67+
assertThrows(
68+
TooManyTraitsException.class,
69+
() -> {
70+
person.addToTraits(newTraits);
71+
});
6272
}
6373

6474
@Test
@@ -69,6 +79,4 @@ public void testSetEyeColor() {
6979

7080
assertEquals(Color.GREEN, person.getEyeColor());
7181
}
72-
73-
7482
}

0 commit comments

Comments
 (0)