コード例 #1
0
        public void ArchaeopteryxUsed_coolDownIncreased_coolDownEqualsCoolDownLimit()
        {
            var mockCharacter     = new Character();
            var mockArchaeopteryx = new Archaeopteryx();

            mockCharacter.CreditArchaeopteryx(mockArchaeopteryx);
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, mockArchaeopteryx, mockTile);

            mockArchaeopteryx.OnTile(mockCharacter, mockTerritory);

            Assert.Equal(mockArchaeopteryx.coolDown, mockArchaeopteryx.coolDownTime);
        }
コード例 #2
0
        public void ArchaeopteryxTiles_territoryUnlocked_returnsAccessible()
        {
            var mockCharacter     = new Character();
            var mockArchaeopteryx = new Archaeopteryx();

            mockCharacter.CreditArchaeopteryx(mockArchaeopteryx);
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, mockArchaeopteryx, mockTile);

            mockArchaeopteryx.OnTile(mockCharacter, mockTerritory);

            Assert.True(mockTerritory.isAccessible);
        }
コード例 #3
0
        public void ArchaeopteryxNotUsed_CharacterDoesNotEnterTerritory_CharacterIsNotInCreatures()
        {
            var mockCharacter = new Character();

            mockCharacter.CreditArchaeopteryx(new Archaeopteryx());
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, new Archaeopteryx(), mockTile);

            mockTerritory.EnterTerritory(mockCharacter);
            var characterMoved = mockTerritory.creatures.Contains(mockCharacter);

            Assert.False(characterMoved);
        }
コード例 #4
0
        public void ArchaeopteryxOpened_TerritoryIsAccessible_True()
        {
            var mockCharacter = new Character();

            mockCharacter.CreditArchaeopteryx(new Archaeopteryx());
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, new Archaeopteryx(), mockTile);

            mockTerritory.OpenTerritory(mockCharacter);
            var territoryIsAccessible = mockTerritory.isAccessible;

            Assert.True(territoryIsAccessible);
        }
コード例 #5
0
        public void ArchaeopteryxOpened_CharacterEntersTerritory_CharacterInCreatures()
        {
            var mockCharacter = new Character();

            mockCharacter.CreditArchaeopteryx(new Archaeopteryx());
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, new Archaeopteryx(), mockTile);

            mockTerritory.OpenTerritory(mockCharacter);
            mockTerritory.EnterTerritory(mockCharacter);
            var characterMoved = mockTerritory.creatures.Contains(mockCharacter);

            Assert.True(characterMoved);
        }
コード例 #6
0
        public void ClosingTerritory_TerritoryIsNotAccessibleAnymore_False()
        {
            var mockCharacter = new Character();

            mockCharacter.CreditArchaeopteryx(new Archaeopteryx());
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, new Archaeopteryx(), mockTile);

            mockTerritory.OpenTerritory(mockCharacter);
            mockTerritory.CloseTerritory(mockCharacter);
            var territoryIsAccessible = mockTerritory.isAccessible;

            Assert.False(territoryIsAccessible);
        }
コード例 #7
0
        public void ArchaeopteryxOpened_PackEntersTerritory_PackInCreatures()
        {
            var mockCharacter = new Character();

            mockCharacter.CreditArchaeopteryx(new Archaeopteryx());
            var mockAnchiornis = new Anchiornis();

            mockAnchiornis.IncreaseFriendliness(25);
            mockCharacter.AddToPack(mockAnchiornis);
            var mockTile      = new MockTile(mockCharacter, 3, 3, 2, 2);
            var mockTerritory = new MockHiddenTerritory(mockCharacter, new Archaeopteryx(), mockTile);

            mockTerritory.OpenTerritory(mockCharacter);
            mockTerritory.EnterTerritory(mockCharacter);
            var packMoved = mockTerritory.creatures.Contains(mockAnchiornis);

            Assert.True(packMoved);
        }