1 changed files with 20 additions and 0 deletions
@ -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…
Reference in new issue