public void TestIfAfter1dmgOf11and1tickStrenghtIs99()
    {
        ShieldModel shieldModel6 = new ShieldModel();

        shieldModel6.TakeDamage(11);
        shieldModel6.Tick();
        Assert.AreEqual(shieldModel6.GetStrength(), 99);
    }
    public void OneDamageOfElevenAndOneTickActionTest()
    {
        ShieldModel sm = new ShieldModel();

        sm.TakeDamage(11);
        sm.Tick();
        Assert.AreEqual(99, sm.GetStrength());
    }
 //Event Button Tick
 public void EVENT_Button_Tick()
 {
     if (model.IsRepairable())
     {
         model.Tick();
     }
     view.Refresh();
 }
    public void IsStrength99After11DamageAndTick()
    {
        ShieldModel model = new ShieldModel();

        model.TakeDamage(11);
        model.Tick();

        Assert.AreEqual(model.GetStrength(), 99);
    }
示例#5
0
    public void CheckingAfter_11_DamageAfterTickStrengthIs10()
    {
        ShieldModel sh = new ShieldModel();

        sh.TakeDamage(11);
        sh.Tick();

        Assert.AreEqual(sh.GetStrength(), 99);
    }
    public void TestDamage11Tick1Strength99()
    {
        // Use the Assert class to test conditions.
        ShieldModel shieldModel = new ShieldModel();

        shieldModel.TakeDamage(11);
        shieldModel.Tick();
        Assert.AreEqual(99, shieldModel.GetStrength());
    }
示例#7
0
 public void ButtonTick()
 {
     if (shieldModel.GetStrength() > shieldModel.RepairableThreshold)
     {
         shieldModel.Tick();
         shieldView.UpdateStrText(shieldModel.GetStrength());
         Debug.Log("Ticked");
     }
 }
示例#8
0
    public void TestAfterDamageAndTick()
    {
        ShieldModel sm = new ShieldModel();

        sm.TakeDamage(11);
        sm.Tick();
        int strength = sm.GetStrength();

        Assert.That(strength == 99);
    }
    public void TestAfterDamage11And1TickStrength99()
    {
        ShieldModel sm       = new ShieldModel();
        int         expected = 99;

        sm.TakeDamage(11);
        sm.Tick();
        int result = sm.GetStrength();

        Assert.AreEqual(expected, result);
    }
    public void After11DamageTest()
    {
        ShieldModel sm = new ShieldModel();

        int expectedStrength = 99;

        sm.TakeDamage(11); //damage by 11

        sm.Tick();         //repair by 10

        int result = sm.GetStrength();

        Assert.AreEqual(expectedStrength, result);
    }
示例#11
0
    public void TestAfterDamageElevenAndTickOneAndStrengthNinetyNine()
    {
        //Arange
        ShieldModel sm             = new ShieldModel();
        int         damage         = 11;
        int         expectedResult = 99;

        //Act
        sm.TakeDamage(damage);
        sm.Tick();
        int strength = sm.GetStrength();

        //assert
        Assert.AreEqual(expectedResult, strength);
    }
    public void TestAfterOneDamageOfElevenAndOneTickStengthNinetyNine()
    {
        // Arrange
        ShieldModel sm             = new ShieldModel();
        int         damage         = 11;
        int         expectedResult = 99;

        // Act
        bool takeDamage = sm.TakeDamage(damage);

        sm.Tick();
        int result = sm.GetStrength();

        // Assert
        Assert.AreEqual(expectedResult, result);
    }
示例#13
0
    public void TestAfter1DamageOf11FollowedBy1TickAndStrength90()
    {
        //arrange
        ShieldModel sm             = new ShieldModel();
        int         damageQty      = 11;
        int         tickQty        = 1;
        int         expectedDamage = 100;

        //act
        bool damageSuccess = sm.IsRepairable();

        sm.Tick();
        int result = sm.GetStrength();

        //assert
        Assert.True(damageSuccess);
        Assert.AreEqual(result, expectedDamage);
    }
示例#14
0
 public void ShieldTick()
 {
     shieldModel.Tick();
     shieldView.ShieldViewUpdate(shieldModel.GetStrength(), shieldModel.IsRepairable());
 }
示例#15
0
 public void EventTick()
 {
     sm.Tick();
     sv.Refresh();
 }
 public void EVENT_Tick()
 {
     model.Tick();
     view.Refresh();
 }
 public void HandleTick()
 {
     model.Tick();
     view.Refresh();
 }
示例#18
0
 public void Tick()
 {
     model.Tick();
     UpdateView();
 }
示例#19
0
 public void EVENT_Tick()
 {
     shieldModel.Tick();
     shieldView.Refresh();
 }
示例#20
0
 public void ApplyTick()
 {
     model.Tick();
 }