public void Cannot_eat_with_an_item_while_it_is_in_the_dishwasher() { Dishwasher washer = new Dishwasher(); Spoon spoon = new Spoon(); washer.Load(spoon); Avatar avatar = new Avatar(); avatar.Eat(new IceCream()).With(spoon); }
public void Ensure_that_you_cannot_eat_ice_cream_with_a_knife() { Avatar avatar = new Avatar(); IceCream iceCream = new IceCream(); Knife knife = new Knife(); avatar.PickUp(knife); avatar.Eat(iceCream).With(knife); }
public void Ensure_that_you_cannot_eat_ice_cream_with_a_fork() { Avatar avatar = new Avatar(); IceCream iceCream = new IceCream(); Fork fork = new Fork(); avatar.PickUp(fork); avatar.Eat(iceCream).With(fork); }
public void Ensure_that_you_cannot_eat_bacon_with_a_spoon() { Avatar avatar = new Avatar(); BaconSlab bacon = new BaconSlab(); Spoon spoon = new Spoon(); bacon.Cook(); avatar.PickUp(spoon); avatar.Eat(bacon).With(spoon); }
public void Eating_raw_bacon_is_bad_for_you() { Avatar avatar = new Avatar(); BaconSlab bacon = new BaconSlab(); Fork fork = new Fork(); Knife knife = new Knife(); avatar.PickUp(fork); avatar.PickUp(knife); avatar.Eat(bacon).With(fork, knife); }
public void Ensure_that_you_can_eat_ice_cream_with_a_spoon_and_doing_so_makes_it_dirty() { Avatar avatar = new Avatar(); IceCream iceCream = new IceCream(); avatar.PickUp(iceCream); Spoon spoon = new Spoon(); avatar.PickUp(spoon); avatar.Eat(iceCream).With(spoon); Assert.AreEqual(DirtRating.Smudged, spoon.DirtRating); Assert.AreEqual(80m, spoon.PercentClean); }
public void Ensure_that_properly_eating_ice_cream_causes_it_to_disappear_into_limbo() { Avatar avatar = new Avatar(); IceCream iceCream = new IceCream(); avatar.PickUp(iceCream); Assert.AreSame(avatar, iceCream.ParentContainerObject); Assert.IsTrue(avatar.Contents.Any(x => x.ObjectId == iceCream.ObjectId)); Spoon spoon = new Spoon(); avatar.PickUp(spoon); avatar.Eat(iceCream).With(spoon); Assert.IsNull(iceCream.ParentContainerObject); Assert.IsFalse(avatar.Contents.Any(x => x.ObjectId == iceCream.ObjectId)); }
public void Ensure_that_properly_eating_bacon_causes_it_to_disappear_into_limbo() { Avatar avatar = new Avatar(); BaconSlab bacon = new BaconSlab(); avatar.PickUp(bacon); Assert.AreSame(avatar, bacon.ParentContainerObject); Assert.IsTrue(avatar.Contents.Any(x => x.ObjectId == bacon.ObjectId)); Fork fork = new Fork(); Knife knife = new Knife(); avatar.PickUp(fork); avatar.PickUp(knife); bacon.Cook(); avatar.Eat(bacon).With(fork, knife); Assert.IsNull(bacon.ParentContainerObject); Assert.IsFalse(avatar.Contents.Any(x => x.ObjectId == bacon.ObjectId)); }
public void Ensure_that_you_can_eat_bacon_with_a_knife_and_fork_and_doing_so_makes_them_dirty() { Avatar avatar = new Avatar(); BaconSlab bacon = new BaconSlab(); avatar.PickUp(bacon); Assert.AreSame(avatar, bacon.ParentContainerObject); Assert.IsTrue(avatar.Contents.Any(x => x.ObjectId == bacon.ObjectId)); Fork fork = new Fork(); Knife knife = new Knife(); avatar.PickUp(fork); avatar.PickUp(knife); Assert.AreEqual(DirtRating.SqueakyClean, fork.DirtRating); Assert.AreEqual(100m, fork.PercentClean); Assert.AreEqual(DirtRating.SqueakyClean, knife.DirtRating); Assert.AreEqual(100m, knife.PercentClean); bacon.Cook(); avatar.Eat(bacon).With(fork, knife); Assert.AreEqual(DirtRating.Smudged, fork.DirtRating); Assert.AreEqual(80m, fork.PercentClean); Assert.AreEqual(DirtRating.Smudged, knife.DirtRating); Assert.AreEqual(80m, knife.PercentClean); }