コード例 #1
0
        public void UseMagicLimitWorks()
        {
            //Given
            BattleStats bs = new BattleStats();
            bool        mg = bs.UseMagic(30);

            //Then
            Assert.False(mg);
        }
コード例 #2
0
        public void UseMagicWorks()
        {
            //Given
            BattleStats bs = new BattleStats();

            bs.UseMagic(10);

            //When
            int expected = 10;
            int actual   = bs.Magic;

            //Then
            Assert.True(expected == actual);
        }
コード例 #3
0
        public void FullRestoreWorks()
        {
            //Given
            BattleStats bs = new BattleStats();

            bs.UseMagic(20);
            bs.FullRestore();

            //When
            int expected = 20;
            int actual   = bs.Magic;

            //Then
            Assert.True(expected == actual);
        }