8000 fixes · githubfoam/gradle-pipeline@e9c5007 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9c5007

Browse files
committed
fixes
1 parent 7106b66 commit e9c5007

File tree

6 files changed

+52
-22
lines changed

6 files changed

+52
-22
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ matrix:
350350
- '$HOME/.m2/repository'
351351
- '$HOME/.gradle'
352352
before_install:
353-
- java -version
353+
# - java -version
354354
- gradle -v
355355
script:
356356
- sudo make deploy-app4
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package foo;
2+
3+
public class Calculator {
4+
public static long sum(long num1, long num2){
5+
return num1+num2;
6+
}
7+
}

app5/src/main/java/foo/Foo.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
/**
44
* Foo class
55
*/
6-
public class Foo {
6+
import org.springframework.boot.SpringApplication;
7+
import org.springframework.boot.autoconfigure.SpringBootApplication;
78

8-
public static int div(int a, int b) throws Exception {
9-
if (b == 0) {
10-
throw new UnsupportedOperationException("Can't divide by zero!");
11-
}
12-
return a / b;
13-
}
9+
@SpringBootApplication
10+
public class Application {
1411

15-
public static void main(String[] args) {
12+
public static void main(String[] args) {
1613
SpringApplication.run(Application.class, args);
1714
}
18-
1915
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package foo;
2+
3+
4+
import org.junit.Test;
5+
6+
import static org.assertj.core.api.Assertions.assertThat;
7+
8+
public class CalculatorTest {
9+
10+
@Test
11+
public void 숫자2개를_더한값이_반환된다(){
12+
//given
13+
long num1 = 1;
14+
long num2 = 2;
15+
16+
//when
17+
long sum = Calculator.sum(num1, num2);
18+
19+
//thwn
20+
assertThat(sum).isEqualTo(3);
21+
}
22+
}
23+

app5/src/test/java/foo/FooTest.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

app5/src/test/java/foo/FooTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package foo;
2+
3+
4+
import org.junit.Test;
5+
import org.junit.runner.RunWith;
6+
import org.springframework.boot.test.context.SpringBootTest;
7+
import org.springframework.test.context.junit4.SpringRunner;
8+
9+
@RunWith(SpringRunner.class)
10+
@SpringBootTest
11+
public class ApplicationTests {
12+
13+
@Test
14+
public void contextLoads() {
15+
}
16+

0 commit comments

Comments
 (0)
0