public void CheckInvincibilityPerk() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); frm.InvincibilityPerk(); Assert.AreEqual(true, frm.perkUse); Assert.AreEqual(true, frm.invble); frm.Dispose(); }
public void CheckIfInvaderIsDestroyed() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); frm.DestroyInvader(frm.inv1); Assert.AreEqual(false, frm.inv1.Visible); Assert.AreEqual(false, frm.picTiroJog.Visible); Assert.AreEqual(50, frm.score); Assert.AreEqual(true, frm.tirodisponivel); frm.Dispose(); }
public void CheckSpeedPerk() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); int speed = frm.canonMovement; frm.SpeedPerk(); Assert.AreEqual(true, frm.perkUse); Assert.AreEqual(speed + 10, frm.canonMovement); frm.Dispose(); }
public void CheckIfGameOver() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); Assert.AreEqual(false, frm.btnNovoJogo.Enabled); Assert.AreEqual(true, frm.gamestart); frm.GameOver(); Assert.AreEqual(true, frm.btnNovoJogo.Enabled); Assert.AreEqual(false, frm.gamestart); frm.Dispose(); }
public void CheckIfValuesInitialized() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); Assert.AreEqual(12, frm.inv1.Left); Assert.AreEqual(16, frm.inv2.Top); Assert.AreEqual(0, frm.ciclos); Assert.AreEqual(0, frm.aproximado); Assert.AreEqual(0, frm.score); Assert.AreEqual(130, frm.inv15.Top); Assert.AreEqual(404, frm.inv18.Left); frm.Dispose(); }
public void CheckIfCanonShoots() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); frm.CanonShoot(); bool visible = frm.picTiroJog.Visible; int x = frm.picJog.Top; Assert.AreEqual(373, frm.picTiroJog.Left); Assert.AreEqual(x - 25, frm.picTiroJog.Top); Assert.AreEqual(false, frm.tirodisponivel); frm.Dispose(); }
public void CheckCanonMovement() { frmInvaders frm = new frmInvaders(); frm.InitializeValues(); int pressLeftArrowKey = 97; frm.CanonMovement(pressLeftArrowKey); Assert.AreEqual(315, frm.picJog.Left); int pressRightArrowKey = 100; frm.CanonMovement(pressRightArrowKey); Assert.AreEqual(355, frm.picJog.Left); frm.Dispose(); }