12
src/main/java/com/example/App.java
Normal file
12
src/main/java/com/example/App.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package com.example;
|
||||
|
||||
public class App {
|
||||
public static int add(int a, int b) { return a + b; }
|
||||
public static int sub(int a, int b) { return a - b; }
|
||||
public static int mul(int a, int b) { return a * b; }
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("CI ready");
|
||||
System.out.println("2 + 3 = " + add(2, 3));
|
||||
}
|
||||
}
|
||||
10
src/test/java/com/example/AppTest.java
Normal file
10
src/test/java/com/example/AppTest.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.example;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class AppTest {
|
||||
@Test void testAdd() { assertEquals(5, App.add(2, 3)); }
|
||||
@Test void testSub() { assertEquals(1, App.sub(3, 2)); }
|
||||
@Test void testMul() { assertEquals(6, App.mul(2, 3)); }
|
||||
}
|
||||
Reference in New Issue
Block a user