public void Should_Not_Accept_Invalid_Temperature() { Assert.Throws <NotValidTemperatureException>(() => { var picker = new DressPicker("CLOUDY"); }); }
public void Initial_State_is_with_Pajama_On(Temperature temperature) { var dressPicker = new DressPicker(temperature.ToString()); Assert.IsTrue(dressPicker.IsPajamaOn); Assert.IsTrue(dressPicker.NumberOfDressesWeared == 1); }
public void Shirt_Must_Be_Put_On_before_Headwear() { var dressPicker = new DressPicker(Temperature.Cold.ToString()); dressPicker.Process((int)Command.TakeOffPajama); Assert.Throws <ShirtMustBePutOnBeforeHeadwearViolation>(() => dressPicker.Process((int)Command.PutOnHeadWear)); }
public void Only_One_Peice_Of_Socks_Can_Put_On() { var dressPicker = new DressPicker(Temperature.Cold.ToString()); dressPicker.Process(((int)Command.TakeOffPajama)); dressPicker.Process((int)Command.PutOnSocks); Assert.Throws <OnlyOnePieceOfEachClothingAllowedViolation>(() => dressPicker.Process((int)Command.PutOnSocks)); }
public void When_Hot_Cannot_Put_On_Socks() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); Assert.Throws <CannotPutOnSocksWhenHotViolation>(() => dressPicker.Process((int)Command.PutOnSocks)); }
public void When_Cold_Can_Put_Socks() { var dressPicker = new DressPicker(Temperature.Cold.ToString()); dressPicker.Process((int)Command.TakeOffPajama); Assert.AreEqual(Outfit.Socks.ToDescription(), dressPicker.Process((int)Command.PutOnSocks)); }
public void Pajama_Not_Found(Temperature temperature) { var dressPicker = new DressPicker(temperature.ToString()); dressPicker.Process((int)Command.TakeOffPajama); Assert.Throws <PajamaNotFoundViolation>(() => dressPicker.Process((int)Command.TakeOffPajama)); }
public void When_Hot_TShirt_Can_Be_Put_On() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); Assert.AreEqual(Outfit.Tshirt.ToDescription(), dressPicker.Process((int)Command.PutOnShirt)); }
public void Socks_Must_Be_Put_On_Before_Shoes() { var dressPicker = new DressPicker(Temperature.Cold.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnPants); Assert.Throws <SocksMustBePutOnBeforeShoesViolation>(() => dressPicker.Process((int)Command.PutOnFootWear)); }
public void When_Hot_FootWear_Should_Be_Sandals() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnPants); Assert.AreEqual(Outfit.Sandals.ToDescription(), dressPicker.Process((int)Command.PutOnFootWear)); }
public void Only_One_Peice_Of_FootWare_Can_Put_On() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnPants); dressPicker.Process((int)Command.PutOnFootWear); Assert.Throws <OnlyOnePieceOfEachClothingAllowedViolation>(() => dressPicker.Process((int)Command.PutOnFootWear)); }
public void When_Hot_Jacket_Can_Not_Be_Put_On() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnShirt); Assert.Throws <CannotPutJacketOnWhenHotViolation>(() => dressPicker.Process((int)Command.PutOnJacket)); }
public void When_Cold_Hat_Can_Be_Put_On() { var dressPicker = new DressPicker(Temperature.Cold.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnShirt); Assert.AreEqual(Outfit.Hat.ToDescription(), dressPicker.Process((int)Command.PutOnHeadWear)); }
public void When_Cold_FootWear_Should_Be_Boots() { var dressPicker = new DressPicker(Temperature.Cold.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnSocks); dressPicker.Process((int)Command.PutOnPants); var footWear = dressPicker.Process((int)Command.PutOnFootWear); Assert.AreEqual(Outfit.Boots.ToDescription(), footWear); }
public void Pants_Must_Be_Put_On_Before_FootWear(Temperature temperature) { var dressPicker = new DressPicker(temperature.ToString()); dressPicker.Process((int)Command.TakeOffPajama); if (temperature == Temperature.Cold) { dressPicker.Process((int)Command.PutOnSocks); } Assert.Throws <PantsMustBePutOnBeforeShoesViolation>(() => dressPicker.Process((int)Command.PutOnFootWear)); }
public void When_Hot_Socks_Is_Not_Manditory_To_Leave_House() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnPants); dressPicker.Process((int)Command.PutOnFootWear); dressPicker.Process((int)Command.PutOnShirt); dressPicker.Process((int)Command.PutOnHeadWear); Assert.AreEqual("leaving house", dressPicker.Process((int)Command.LeaveHouse)); }
public void When_Hot_Headwear_Is_Manditory_To_Leave_House() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); dressPicker.Process((int)Command.TakeOffPajama); dressPicker.Process((int)Command.PutOnPants); dressPicker.Process((int)Command.PutOnFootWear); dressPicker.Process((int)Command.PutOnShirt); Assert.Throws <NotValidToLeaveHouseViolation>(() => dressPicker.Process((int)Command.LeaveHouse)); dressPicker.Process((int)Command.PutOnHeadWear); Assert.AreEqual("leaving house", dressPicker.Process((int)Command.LeaveHouse)); }
public void Can_Remove_Pajama(Temperature temperature) { var dressPicker = new DressPicker(temperature.ToString()); Assert.AreEqual("Removing PJs", dressPicker.Process((int)Command.TakeOffPajama)); }
public void Cannot_Leave_House_With_Pajama(Temperature temperature) { var dressPicker = new DressPicker(temperature.ToString()); Assert.Throws <NotValidToLeaveHouseViolation>(() => dressPicker.Process((int)Command.LeaveHouse)); }
public void Should_Not_Accept_Invalid_Commands() { var dressPicker = new DressPicker(Temperature.Hot.ToString()); Assert.Throws <NotValidCommandException>(() => dressPicker.Process(11)); }
public void Pajama_Must_Taken_Off_Before_Socks_Put_On(Temperature temperature) { var dressPicker = new DressPicker(temperature.ToString()); Assert.Throws <PajamaMustTakeOffViolation>(() => dressPicker.Process((int)Command.PutOnSocks)); }