Browse Source

上传文件至 'project/src/test/java/com/example'

main
Xingzhimeng 3 weeks ago
parent
commit
b46f115a9a
  1. 20
      project/src/test/java/com/example/AppTest.java

20
project/src/test/java/com/example/AppTest.java

@ -0,0 +1,20 @@
package com.example;
import org.junit.Test;
import static org.junit.Assert.*;
public class AppTest {
@Test
public void testAdd() {
App app = new App();
int result = app.add(2, 3);
assertEquals(5, result);
}
@Test
public void testAddNegative() {
App app = new App();
int result = app.add(-1, 1);
assertEquals(0, result);
}
}
Loading…
Cancel
Save