public void ItNeedsAName_AndSouldBeObligatory() { var name = "Mr. Jumps"; IMagical rabbit = new Rabbit(name); Assert.AreEqual(name, rabbit.Name); }
public void WhenTwoRabbitsHasTheSameNames_TheyShouldBeEquals() { string name = "Joker"; IMagical rabbit = new Rabbit(name); IMagical anotherRabbit = new Rabbit(name); Assert.AreEqual(rabbit, anotherRabbit); }
public void WhenTwoRabbitsHasDifferentNames_TheyShouldBeNotEquals() { string name = "Mr. Jumps"; Rabbit rabbit = new Rabbit(name); Rabbit anotheRabbit = new Rabbit(name+" 2"); Assert.AreNotEqual(rabbit, anotheRabbit); }
public void CanPutACardAndARabbit_ThenCanGetTheTwo() { IMagical aCard = new Card("Joker"); IMagical aRabbit = new Rabbit("Mr. Jumps"); _simpleHat.PutIn(aCard); _simpleHat.PutIn(aRabbit); List<IMagical> magicals = new List<IMagical>(); magicals.Add(_simpleHat.Shazaam()); magicals.Add(_simpleHat.Shazaam()); if (!(magicals.Contains(aCard) && magicals.Contains(aRabbit))) Assert.Fail(); }
public void WhenPassingNull_RabbitFailFast() { IMagical rabbit = new Rabbit(null); }
public void CanSaveARabbitInIt_AndRetriveIt() { IMagical aRabbit = new Rabbit("Mr. Jumps"); _simpleHat.PutIn(aRabbit); Assert.AreSame(aRabbit, _simpleHat.Shazaam()); }