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); }
public virtual void Test_SpiderPeople_Refill_WebShooter() { //Assign pp = new PeterParker(); //Act bool defaultWebShooter = pp.WebCartridge.CartridgeInstalled; pp.RefillWebShooter(); bool afterWebShooter = pp.WebCartridge.CartridgeInstalled; //Arrange Assert.AreEqual(false, defaultWebShooter); Assert.AreEqual(true, afterWebShooter); }
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 TestSpiderPeopleWebShooterPrepared() { pp = new PeterParker(); //Act bool defaultWebShooterState = pp.WebShooterReady; pp.RefillWebShooter(); bool refillWebShooter = pp.WebShooterReady; pp.WebShooterPrepared(); bool finalWebShooter = pp.WebShooterReady; //Assert Assert.AreEqual(false, defaultWebShooterState); Assert.AreEqual(false, refillWebShooter); Assert.AreEqual(true, finalWebShooter); }
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); }