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