Day 7:
```java
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class CalculatorTest {
private Calculator calculator = new Calculator();
@Test
public void testAdd() {
Assertions.assertEquals(5, calculator.add(2, 3));
}
@Test
public void testSubtract() {
Assertions.assertEquals(2, calculator.subtract(5, 3));
}
@Test
public void testMultiply() {
Assertions.assertEquals(10, calculator.multiply(2, 5));
}
@Test
public void testDivide() {
Assertions.assertEquals(2, calculator.divide(10, 5));
}
}
标签:assertEquals,calculator,冲刺,void,Assertions,Test,public From: https://www.cnblogs.com/2574999647wyx/p/17473094.html