public void TestTamagotchiPlay() { _tamagotchi = new Tamagotchi(); _tamagotchi.Play(DefaultValues.Play); Assert.IsTrue(_tamagotchi.Happiness == DefaultValues.MaxValue); Assert.IsTrue(_tamagotchi.Tiredness == DefaultValues.MinValue + DefaultValues.Play); }
public void TestTamagotchiSleep() { _tamagotchi = new Tamagotchi(DefaultValues.MinValue, DefaultValues.MaxValue, DefaultValues.MinValue, DefaultValues.MinValue); _tamagotchi.Sleep(DefaultValues.Sleep); Assert.IsTrue(_tamagotchi.Tiredness == DefaultValues.MaxValue - DefaultValues.Sleep); }
public void TestTamagotchiFeed() { _tamagotchi = new Tamagotchi(); _tamagotchi.Feed(DefaultValues.Feed); Assert.IsTrue(_tamagotchi.Hungriness == DefaultValues.MaxValue - DefaultValues.Feed); Assert.IsTrue(_tamagotchi.Fullness == DefaultValues.MinValue + DefaultValues.Feed); }
public void TestSetup() { _tamagotchiMock = new Mock <ITamagotchi>(); _tamagotchiMock.Setup(x => x.Sleep(It.IsAny <int>())).Returns(true); _tamagotchiMock.Setup(x => x.Sleep(DefaultValues.MaxValue)).Returns(false); _tamagotchiMock.Setup(x => x.Tiredness == 50); _tamagotchiObject = _tamagotchiMock.Object; }
public void TestSetupOfNewTamagotchi() { _tamagotchi = new Tamagotchi(20, 20, 20, 20); Assert.IsTrue(_tamagotchi.Happiness == 20); Assert.IsTrue(_tamagotchi.Tiredness == 20); Assert.IsTrue(_tamagotchi.Hungriness == 20); Assert.IsTrue(_tamagotchi.Fullness == 20); }
public void TestSetupOfDefaultTamagotchi() { _tamagotchi = new Tamagotchi(); Assert.IsTrue(_tamagotchi.Happiness == DefaultValues.MaxValue); Assert.IsTrue(_tamagotchi.Tiredness == DefaultValues.MinValue); Assert.IsTrue(_tamagotchi.Hungriness == DefaultValues.MaxValue); Assert.IsTrue(_tamagotchi.Fullness == DefaultValues.MinValue); }
public void TestDeadTamagotchiInterval() { _tamagotchi = new Tamagotchi(DefaultValues.MinValue, DefaultValues.MaxValue, DefaultValues.MaxValue, DefaultValues.MaxValue); _tamagotchi.Interval(); Assert.IsTrue(_tamagotchi.Happiness == DefaultValues.MinValue); Assert.IsTrue(_tamagotchi.Tiredness == DefaultValues.MaxValue); Assert.IsTrue(_tamagotchi.Hungriness == DefaultValues.MaxValue); Assert.IsTrue(_tamagotchi.Fullness == DefaultValues.MaxValue - 1); }
public void TestTamagotchiPoo() { _tamagotchi = new Tamagotchi(); Assert.IsFalse(_tamagotchi.Poop(DefaultValues.Poo)); Assert.IsTrue(_tamagotchi.Fullness == DefaultValues.MinValue); }