public void ShouldIncreaseHeathAfterSleeping_InRange() { var stu = new PlayerCharacter.PlayerCharacter { Health = 100 }; stu.Sleep(); Assert.That(stu.Health, Is.InRange(101, 200)); }
public void ShouldIncreaseHeathAfterSleeping_returnTrue() { var stu = new PlayerCharacter.PlayerCharacter { Health = 100 }; stu.Sleep(); Assert.That(stu.Health, Is.GreaterThan(100)); }
public void ReferenceEqualityDemo_ReturnFalse() { var player1 = new PlayerCharacter.PlayerCharacter(); var player2 = new PlayerCharacter.PlayerCharacter(); //Assert.That(player1, Is.SameAs(player2)); // this test should fail var player3 = player1; Assert.That(player1, Is.SameAs(player3)); // this test should pass }
public void ShouldHaveAllTheExpectedWeapon_ReturnTrue() { var stu = new PlayerCharacter.PlayerCharacter(); var expectedWeapons = new List <string>() { "Short sword", "Short bow", "Long bow" }; Assert.That(stu.Weapons, Is.EquivalentTo(expectedWeapons)); }
public void ShouldHaveTwoBows() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Weapons, Has.Exactly(2).EndsWith("bow")); }
public void ShouldHaveAtLeastOneKingSword() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Weapons, Has.Some.Contains("sword")); }
public void ShouldHaveALongBow() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Weapons, Contains.Item("Long bow")); }
public void ShouldHaveNoEmptyDeaultWeapons() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Weapons, Is.All.Not.Empty); }
public void ShouldBeNewbie() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.IsNoob, Is.True); }
public void ShouldNotHaveNickName() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.NickName, Is.Null); }
public void ShouldHaveDefaultRandomGeneratedName() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Name, Is.Not.Empty); }
public void CheckForStaffOfWander_ReturnTrue() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Weapons, Has.None.EqualTo("staff of wander")); }
public void ShouldHaveNotMoreThanOneTypeOfAGivenWeapon() { var stu = new PlayerCharacter.PlayerCharacter(); Assert.That(stu.Weapons, Is.Unique); }