コード例 #1
0
ファイル: ZoneStateTests.cs プロジェクト: sruon/EasyFarm
        public void CheckIsTrueWhenZoneChanges()
        {
            // Fixture setup
            context.Player.Zone = StartingZone;
            context.Zone        = NewZone;
            context.Player.Str  = 100;
            // Exercise system
            bool result = sut.Check(context);

            // Verify outcome
            Assert.True(result);
            // Teardown
        }
コード例 #2
0
        public void CheckIsFalseWhenNotZoning()
        {
            // Fixture setup
            var api    = new FakeMemoryAPI();
            var player = new FakePlayer
            {
                Zone  = Zone.Konschtat_Highlands,
                Stats = new Structures.PlayerStats {
                    Str = 100
                }
            };

            api.Player = player;
            var sut = new ZoneState(api);;

            // Exercise system
            var result = sut.Check();

            // Verify outcome
            Assert.False(result);

            // Teardown
        }
コード例 #3
0
ファイル: ZoneStateTests.cs プロジェクト: PmanAce/EasyFarm
        public void CheckIsTrueWhenPlayersStatsAreZero()
        {
            // Fixture setup
            var api    = new FakeMemoryAPI();
            var player = new FakePlayer
            {
                Zone  = Zone.Konschtat_Highlands,
                Stats = new Structures.PlayerStats {
                    Str = 0
                }
            };

            api.Player = player;
            var sut = new ZoneState(new StateMemory(api));

            // Exercise system
            var result = sut.Check();

            // Verify outcome
            Assert.True(result);

            // Teardown
        }
コード例 #4
0
        public void CheckIsTrueWhenZoneChanges()
        {
            // Fixture setup
            var api    = new FakeMemoryAPI();
            var player = new FakePlayer {
                Zone = Zone.Konschtat_Highlands
            };

            api.Player = player;
            var sut = new ZoneState(api);

            player.Zone  = Zone.Valkurm_Dunes;
            player.Stats = new Structures.PlayerStats {
                Str = 100
            };

            // Exercise system
            var result = sut.Check();

            // Verify outcome
            Assert.True(result);

            // Teardown
        }