public virtual void Test_SpiderPeople_Web_Swing_ready_prepared() { //This should not change anything because the web shooter isn't prepared yet //Arrange pp = new PeterParker(); //Act int startingWebCount = pp.CurrentWebCount; pp.RefillWebShooter(); pp.WebShooterPrepared(); pp.WebSwing((pp.MaxWebCount + 1)); //this is to make sure the spider person can't swing webs exceeding their max web count int error_swing = pp.CurrentWebCount; pp.WebSwing(pp.CurrentWebCount); int final_swing = pp.CurrentWebCount; //Assert Assert.AreEqual(pp.MaxWebCount, startingWebCount); Assert.AreEqual(startingWebCount, error_swing); Assert.AreEqual(0, final_swing); }
public void Test_SpiderPeople_Web_Swing_not_ready() { //This test should not change the values because the web shooter isn't ready yet and also not prepared //Arrange pp = new PeterParker(); //Act int startingWebCount = pp.CurrentWebCount; pp.WebSwing(); int after_one_web_swing = pp.CurrentWebCount; //Assert Assert.AreEqual(pp.MaxWebCount, startingWebCount); Assert.AreEqual(startingWebCount, after_one_web_swing); }
public void Test_SpiderPeople_Web_Swing_not_prepared() { //This should not change anything because the web shooter isn't prepared yet //Arrange pp = new PeterParker(); //Act int startingWebCount = pp.CurrentWebCount; pp.RefillWebShooter(); pp.WebSwing(); int after_one_swing_web_shooter_not_prepared = pp.CurrentWebCount; //Assert Assert.AreEqual(pp.MaxWebCount, startingWebCount); Assert.AreEqual(startingWebCount, after_one_swing_web_shooter_not_prepared); }
public virtual void Test_SpiderPeople_Refill_WebShooter_After_Depletion() { //Arrange pp = new PeterParker(); //Act pp.RefillWebShooter(); pp.WebShooterPrepared(); pp.WebSwing(pp.MaxWebCount); int depleted_web_cartridge = pp.CurrentWebCount; pp.RefillWebShooter(); int refilled_web_cartridge = pp.CurrentWebCount; //Assert Assert.AreEqual(0, depleted_web_cartridge); Assert.AreEqual(pp.MaxWebCount, refilled_web_cartridge); }