|
@ -7,6 +7,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; |
|
|
|
|
|
|
|
|
public class ShopCommandTest { |
|
|
public class ShopCommandTest { |
|
|
final ShopCommand shopCommand = new ShopCommand(); |
|
|
final ShopCommand shopCommand = new ShopCommand(); |
|
|
|
|
|
final Shop shop = new Shop(); |
|
|
@Test |
|
|
@Test |
|
|
public void testValidInput1(){ |
|
|
public void testValidInput1(){ |
|
|
boolean expected = true; |
|
|
boolean expected = true; |
|
@ -31,4 +32,13 @@ public class ShopCommandTest { |
|
|
boolean result = shopCommand.validInput("4"); |
|
|
boolean result = shopCommand.validInput("4"); |
|
|
assertEquals(expected, result); |
|
|
assertEquals(expected, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void testSubtractGold(){ |
|
|
|
|
|
int expected = 1; |
|
|
|
|
|
int result = shop.subtractGold(3, 2); |
|
|
|
|
|
assertEquals(expected, result); |
|
|
|
|
|
} |
|
|
} |
|
|
} |