sonar fix - add test cases for CommanderTest

This commit is contained in:
atayal
2021-11-05 17:17:24 +05:30
parent 37be2bb2a4
commit cc685fc20e

View File

@@ -178,6 +178,15 @@ class CommanderTest {
assertFalse(StringUtils.isBlank(order.id));
}
@Test
void testPlaceOrderNoExceptionShortMsgDuration() throws Exception {
Commander c = buildCommanderObjectNoException();
var order = new Order(new User("K", "J"), "pen", 1f);
Thread.sleep(messageTime);
c.placeOrder(order);
assertFalse(StringUtils.isBlank(order.id));
}
@Test
void testPlaceOrderWithDatabase() throws Exception {
Commander c = buildCommanderObjectWithDB();