Beispiel #1
0
        public void 負のダメージはHPを変化させない()
        {
            var hpModel = new TestHPModel();

            Assert.That(hpModel.HP.Value, Is.EqualTo(100));
            hpModel.Damage(-50);
            Assert.That(hpModel.HP.Value, Is.EqualTo(100));
        }
Beispiel #2
0
        public void ダメージ0ではHPは変化しない()
        {
            var hpModel = new TestHPModel();

            Assert.That(hpModel.HP.Value, Is.EqualTo(100));
            hpModel.Damage(0);
            Assert.That(hpModel.HP.Value, Is.EqualTo(100));
        }
Beispiel #3
0
        public void HP以上のダメージを受けたらHPは0になる()
        {
            var hpModel = new TestHPModel();

            Assert.That(hpModel.HP.Value, Is.EqualTo(100));
            hpModel.Damage(120);
            Assert.That(hpModel.HP.Value, Is.EqualTo(0));
        }
Beispiel #4
0
        public void ダメージを受けるとHPが減少する()
        {
            var hpModel = new TestHPModel();

            Assert.That(hpModel.HP.Value, Is.EqualTo(100));
            hpModel.Damage(30);
            Assert.That(hpModel.HP.Value, Is.EqualTo(70));
        }