tests complete
This commit is contained in:
parent
51b4b1b53e
commit
f3f31c1a03
@ -43,19 +43,43 @@ class LabworksApplicationTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void StrMinus() {
|
void StrMinus() {
|
||||||
final String res = calculatorService.Minus("string", 10, 2).toString();
|
final String res = calculatorService.Minus("string", "10", "0").toString();
|
||||||
Assertions.assertEquals("8", res);
|
Assertions.assertEquals("1", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void StrMulti() {
|
void StrMulti() {
|
||||||
final String res = calculatorService.Multi("string", 10, 2).toString();
|
final String res = calculatorService.Multi("string", "10", "2").toString();
|
||||||
Assertions.assertEquals("20", res);
|
Assertions.assertEquals("1010", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void StrDiv() {
|
void StrDiv() {
|
||||||
final String res = calculatorService.Div("string", 10, 2).toString();
|
final String res = calculatorService.Div("string", "1010", "2").toString();
|
||||||
Assertions.assertEquals("5", res);
|
Assertions.assertEquals("10", res);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void ArrayPlus() {
|
||||||
|
final String res = calculatorService.Plus("array", "2,2,4", "2").toString();
|
||||||
|
Assertions.assertEquals("4,4,6", res);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void ArrayMinus() {
|
||||||
|
final String res = calculatorService.Minus("array", "2,2,4", "2").toString();
|
||||||
|
Assertions.assertEquals("0,0,2", res);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void ArrayMulti() {
|
||||||
|
final String res = calculatorService.Multi("array", "2,2,4", "2").toString();
|
||||||
|
Assertions.assertEquals("4,4,8", res);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void ArrayDiv() {
|
||||||
|
final String res = calculatorService.Div("array", "2,2,4", "2").toString();
|
||||||
|
Assertions.assertEquals("1,1,2", res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user