public void IsDefaultWrappingServiceReturningAWrappingForAllRequiredMenuItemTypesTest() { Assert.That(DefaultWrappingService.GetInstance().GetWrapping <FrenchFries>(), Is.AssignableTo(typeof(Wrapping)), "The DefaultWrappingService is not returning an expected wrapping!"); Assert.That(DefaultWrappingService.GetInstance().GetWrapping <Toy>(), Is.AssignableTo(typeof(Wrapping)), "The DefaultWrappingService is not returning an expected wrapping!"); Assert.That(DefaultWrappingService.GetInstance().GetWrapping <Soda>(), Is.AssignableTo(typeof(Wrapping)), "The DefaultWrappingService is not returning an expected wrapping!"); Assert.That(DefaultWrappingService.GetInstance().GetWrapping <Burger>(), Is.AssignableTo(typeof(Wrapping)), "The DefaultWrappingService is not returning an expected wrapping!"); Assert.That(DefaultWrappingService.GetInstance().GetWrapping <Menu>(), Is.AssignableTo(typeof(Wrapping)), "The DefaultWrappingService is not returning an expected wrapping!"); }
public void IsDefaultWrappingServiceReturningTheCorrectMessageIfAWrappingForAMenuItemTypeIsNotFoundTest() { DefaultWrappingService.GetInstance().GetWrapping <MenuItem>(); }
public void IsWaiterUsingTheDefaultWrappingServiceTest() { Assert.AreEqual(DefaultWrappingService.GetInstance().GetType(), new Waiter().WrappingService.GetType(), "Incorrect default Wrapping Service used by the Waiter!"); }
/// <summary> /// Instantiates the Toy class based on a default Wrapping Service. /// </summary> /// <exception cref="MissingWrappingForMenuItemException">Thrown is no Wrapping for the Toy was found.</exception> protected Toy() : this(DefaultWrappingService.GetInstance()) { }