final 2 lab
This commit is contained in:
parent
499575123d
commit
2bf02801db
@ -14,29 +14,6 @@ class SbappApplicationTests {
|
|||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
}
|
}
|
||||||
@Test
|
|
||||||
void testIntPlus() {
|
|
||||||
final String res = (String) Service.Func1( "100", "10", "int");
|
|
||||||
Assertions.assertEquals("110", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testIntMinus() {
|
|
||||||
final String res = (String)Service.Func2( "100", "10", "int");
|
|
||||||
Assertions.assertEquals("90", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testIntMultiply() {
|
|
||||||
final String res = (String)Service.Func3( "100", "10", "int");
|
|
||||||
Assertions.assertEquals("1000", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testIntDivision() {
|
|
||||||
final String res = (String)Service.Func4( "100", "10", "int");
|
|
||||||
Assertions.assertEquals("10", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testStringPlus() {
|
void testStringPlus() {
|
||||||
@ -45,21 +22,21 @@ class SbappApplicationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testStringtoUpper() {
|
void testStringToUpper() {
|
||||||
final String res = (String)Service.Func2( "abc", "dfe", "str");
|
final String res = (String)Service.Func2( "abc", "dfe", "str");
|
||||||
Assertions.assertEquals("ABCDFE", res);
|
Assertions.assertEquals("ABCDFE", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testStringtoLower() {
|
void testStringSplit() {
|
||||||
final String res = (String)Service.Func3( "abc", "dfe", "str");
|
final String res = (String)Service.Func3( "ff1f1f1f1f1f", "1", "str");
|
||||||
Assertions.assertEquals("abcdfe", res);
|
Assertions.assertEquals("ff f f f f f", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testStringStrange() {
|
void testStringToLower() {
|
||||||
final String res = (String)Service.Func4( "abc", "dfe", "str");
|
final String res = (String)Service.Func4( "aBc", "dFE", "str");
|
||||||
Assertions.assertEquals("abcDFE", res);
|
Assertions.assertEquals("abcdfe", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -69,20 +46,20 @@ class SbappApplicationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testDoubleMinus() {
|
void testDoubleMin() {
|
||||||
final String res = (String)Service.Func2( "1.01", "2.76", "double");
|
final String res = (String)Service.Func2( "1.01", "2.76", "double");
|
||||||
Assertions.assertEquals("-1.7499999999999998", res);
|
Assertions.assertEquals("1.01", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testDoubleMyltiply() {
|
void testDoubleMax() {
|
||||||
final String res = (String)Service.Func3( "1.01", "2.76", "double");
|
final String res = (String)Service.Func3( "1.01", "2.76", "double");
|
||||||
Assertions.assertEquals("2.7876", res);
|
Assertions.assertEquals("2.76", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testDoubleDivision() {
|
void testDoublePow() {
|
||||||
final String res = (String)Service.Func4( "1.01", "2.76", "double");
|
final String res = (String)Service.Func4( "2.73", "3.11", "double");
|
||||||
Assertions.assertEquals("0.36594202898550726", res);
|
Assertions.assertEquals("22.723008571403522", res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user