Esempio n. 1
0
 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!");
 }
Esempio n. 2
0
 public void IsDefaultWrappingServiceReturningTheCorrectMessageIfAWrappingForAMenuItemTypeIsNotFoundTest()
 {
     DefaultWrappingService.GetInstance().GetWrapping <MenuItem>();
 }
Esempio n. 3
0
 public void IsWaiterUsingTheDefaultWrappingServiceTest()
 {
     Assert.AreEqual(DefaultWrappingService.GetInstance().GetType(), new Waiter().WrappingService.GetType(),
                     "Incorrect default Wrapping Service used by the Waiter!");
 }
Esempio n. 4
0
 /// <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())
 {
 }