remove string-related code
This commit is contained in:
parent
a35c7789b9
commit
ab560b7580
|
@ -75,26 +75,6 @@ public class PizzaUnitTest {
|
|||
pz.setStatus(Pizza.PizzaStatusEnum.READY);
|
||||
pz.deliver();
|
||||
assertTrue(pz.getStatus() == Pizza.PizzaStatusEnum.DELIVERED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenConvertedIntoEnum_thenGetsConvertedCorrectly() {
|
||||
String pizzaEnumValue = "READY";
|
||||
PizzaStatusEnum pizzaStatusEnum = PizzaStatusEnum.valueOf(pizzaEnumValue);
|
||||
assertTrue(pizzaStatusEnum == PizzaStatusEnum.READY);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void whenConvertedIntoEnum_thenThrowsException() {
|
||||
String pizzaEnumValue = "rEAdY";
|
||||
PizzaStatusEnum pizzaStatusEnum = PizzaStatusEnum.valueOf(pizzaEnumValue);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void givenInvalidEnumValueContentWiseAsString_whenConvertedIntoEnum_thenThrowsException() {
|
||||
String pizzaEnumValue = "invalid";
|
||||
PizzaStatusEnum pizzaStatusEnum = PizzaStatusEnum.valueOf(pizzaEnumValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue