BusinessLogic.Tests.UnitTests.LogicTests.GameDefinitionsTests.GameDefinitionRetrieverTests.GetAllGameDefinitionNamesTests.ItReturnsOnlyActiveGameDefinitions C# (CSharp) Метод

ItReturnsOnlyActiveGameDefinitions() приватный Метод

private ItReturnsOnlyActiveGameDefinitions ( ) : void
Результат void
        public void ItReturnsOnlyActiveGameDefinitions()
        {
            const int ACTIVE_GAME_DEFINITION_ID = 1;
            var gameDefinitionList = new List<GameDefinition>
            {
                new GameDefinition
                {
                    Id = ACTIVE_GAME_DEFINITION_ID,
                    Active = true,
                    GamingGroupId = currentUser.CurrentGamingGroupId
                },
                new GameDefinition
                {
                    Id = ACTIVE_GAME_DEFINITION_ID + 1,
                    Active = false,
                    GamingGroupId = currentUser.CurrentGamingGroupId
                }
            };

            autoMocker.Get<IDataContext>().Expect(mock => mock.GetQueryable<GameDefinition>()).Return(gameDefinitionList.AsQueryable());

            var results = autoMocker.ClassUnderTest.GetAllGameDefinitionNames(this.currentUser.CurrentGamingGroupId);

            Assert.That(results.Count, Is.EqualTo(1));
            Assert.That(results[0].Id, Is.EqualTo(ACTIVE_GAME_DEFINITION_ID));
        }