fixes
This commit is contained in:
parent
edbbe4d2b1
commit
7545b7e1fa
@ -23,6 +23,7 @@ public class MakerService {
|
||||
} else if (type.equals("string")) {
|
||||
return maker.plus(value1.toString(), value2.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Object minus(Object value1, Object value2, String type) {
|
||||
final Maker maker = (Maker) applicationContext.getBean(type);
|
||||
@ -31,6 +32,7 @@ public class MakerService {
|
||||
} else if (type.equals("string")) {
|
||||
return maker.minus(value1.toString(), value2.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Object multiply(Object value1, Object value2, String type) {
|
||||
final Maker maker = (Maker) applicationContext.getBean(type);
|
||||
@ -39,6 +41,7 @@ public class MakerService {
|
||||
} else if (type.equals("string")) {
|
||||
return maker.multiply(value1.toString(), Integer.valueOf(value2.toString()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Object divide(Object value1, Object value2, String type) {
|
||||
final Maker maker = (Maker) applicationContext.getBean(type);
|
||||
@ -47,5 +50,6 @@ public class MakerService {
|
||||
} else if (type.equals("string")) {
|
||||
return maker.divide(value1.toString(), Integer.valueOf(value2.toString()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -55,7 +55,7 @@ class YanApplicationTests {
|
||||
@Test
|
||||
void testMakerStringDivideFalse() {
|
||||
final Object res = makerService.divide("12345678", 4, "string");
|
||||
Assertions.assertEquals("12 ; 34 ; 56 ; 78 ;", res);
|
||||
Assertions.assertEquals("12 ; 34 ; 56 ; 78 ; ", res);
|
||||
}
|
||||
@Test
|
||||
void testSpeakerFalseBean() {
|
||||
|
Loading…
Reference in New Issue
Block a user