public void RoboDinoCopNameShouldBeRoboCoptor() { // Arrange - setting up code to test RobotDinosaurPoliceOfficer cop = new RobotDinosaurPoliceOfficer(); // Act - acting on the thing we're testing string name = cop.Name; // Assert - verifying correct behavior after act Assert.AreEqual("RoboCoptor", name, "Dude, your dino cop had a bad name"); }
public void RoboDinoCopShouoldSnoreWhenAsleep() { //arrange RobotDinosaurPoliceOfficer cop = new RobotDinosaurPoliceOfficer(); cop.IsCaffenated = true; //act string sound = cop.MakeSoundOnce(); //assert Assert.AreEqual("RED BULL???", sound); }
public void RoboDinoCopShouldSnoreWhenAsleep() { // Arrange RobotDinosaurPoliceOfficer cop = new RobotDinosaurPoliceOfficer(); cop.IsAsleep = true; // Act string sound = cop.MakeSoundOnce(); // Assert Assert.AreEqual("Zzzzzzzzzz", sound); }
public void RoboDinoCopNameShouldBeTriceroCops() { // Arrange - setting up code RobotDinosaurPoliceOfficer cop = new RobotDinosaurPoliceOfficer(); cop.IsAsleep = true; // Act - acting on the thing were testing string name = cop.Name; // Assert - verify the behavior Assert.AreEqual("RoboCoptor", name, "Dude, you don't know how to remember names"); }
public void RoboDinoCopShouldStartAsleep() { // Arrange RobotDinosaurPoliceOfficer cop = new RobotDinosaurPoliceOfficer(); // Act - no action is needed // Assert Assert.IsFalse(!cop.IsAsleep, "Cop didn't start asleep"); if (!cop.IsAsleep) { Assert.Fail("Dude, the cop should start asleep! It's awake!"); } }
public void RoboDinoCopShouldBuzzWhenCaffenated() { // Arrange RobotDinosaurPoliceOfficer cop = new RobotDinosaurPoliceOfficer(); cop.IsAsleep = false; cop.IsCaffenated = true; // Act string sound = cop.MakeSoundOnce(); cop.MakeSoundTwice(); // Assert Assert.AreEqual("RED BULL???", sound); }