Skip to content

Commit d528018

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
Formatted with Google Java Formatter
1 parent 9bf70a7 commit d528018

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
package com.examplehub.basics.number;
22

3-
public class DoubleExample {
4-
}
3+
public class DoubleExample {}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
package com.examplehub.basics.oop;
22

3-
public class ObjectExample {
4-
}
3+
public class ObjectExample {}

src/test/java/com/examplehub/basics/number/DoubleExampleTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.examplehub.basics.number;
22

3-
import org.junit.jupiter.api.Test;
4-
53
import static org.junit.jupiter.api.Assertions.*;
64

5+
import org.junit.jupiter.api.Test;
6+
77
class DoubleExampleTest {
88
@Test
99
void testValueOf() {
@@ -29,4 +29,4 @@ void testAutoboxing() {
2929
double pi = d;
3030
assertEquals(3.14, pi);
3131
}
32-
}
32+
}

src/test/java/com/examplehub/basics/number/IntegerExampleTest.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import static org.junit.jupiter.api.Assertions.*;
44

5-
import jdk.jfr.StackTrace;
65
import org.junit.jupiter.api.Test;
7-
import org.junit.jupiter.api.function.Executable;
86

97
class IntegerExampleTest {
108

@@ -29,10 +27,12 @@ void testParseInt() {
2927
System.out.println(number);
3028
assertEquals(123, number);
3129

32-
assertThrows(NumberFormatException.class, () -> {
33-
int num = Integer.parseInt("123a");
34-
fail();
35-
});
30+
assertThrows(
31+
NumberFormatException.class,
32+
() -> {
33+
int num = Integer.parseInt("123a");
34+
fail();
35+
});
3636
}
3737

3838
@Test
@@ -71,7 +71,7 @@ void testToOctalString() {
7171
}
7272

7373
@Test
74-
void test(){
74+
void test() {
7575
assertEquals("a", Integer.toHexString(10));
7676
}
7777
}

src/test/java/com/examplehub/basics/oop/ObjectExampleTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.examplehub.basics.oop;
22

3-
import org.junit.jupiter.api.Test;
3+
import static org.junit.jupiter.api.Assertions.*;
44

55
import java.util.Objects;
6-
7-
import static org.junit.jupiter.api.Assertions.*;
6+
import org.junit.jupiter.api.Test;
87

98
class ObjectExampleTest {
109
@Test
@@ -18,6 +17,7 @@ void testEquals() {
1817
class Student {
1918
private int id;
2019
private String name;
20+
2121
public Student(int id, String name) {
2222
this.id = id;
2323
this.name = name;
@@ -107,4 +107,4 @@ public String toString() {
107107
People people = new People("duyuanchao", 25);
108108
assertEquals("name = duyuanchao, age = 25", people.toString());
109109
}
110-
}
110+
}

0 commit comments

Comments
 (0)