BusinessLogic.Tests.UnitTests.LogicTests.PlayersTests.PlayerRetrieverTests.GetAllPlayersWithNemesisInfoTests.WhenCallingPopulateNemePointsSummary.ItOnlySumsUpPointsFromGamesThatInTheSpecifiedGamingGroup C# (CSharp) Method

ItOnlySumsUpPointsFromGamesThatInTheSpecifiedGamingGroup() private method

            public void ItOnlySumsUpPointsFromGamesThatInTheSpecifiedGamingGroup()
            {
                //--arrange
                var playersWithNemeses = new List<PlayerWithNemesis>
                {
                    new PlayerWithNemesis
                    {
                        PlayerId = _playerOneId
                    }
                };
                var playerGameResult = MakePlayerGameResult(_playerOneId);
                playerGameResult.PlayedGame.GamingGroupId = _expectedGamingGroupId + 100;
                _playerGameResults.Add(playerGameResult);
                _autoMocker.Get<IDataContext>().Expect(mock => mock.GetQueryable<PlayerGameResult>()).Return(_playerGameResults.AsQueryable());

                //--act
                _autoMocker.ClassUnderTest.PopulateNemePointsSummary(_expectedGamingGroupId, playersWithNemeses, _dateRangeFilterThatCatchesEverything);

                //--assert
                Assert.That(playersWithNemeses[0].NemePointsSummary, Is.Not.Null);
                var actualNemePointsSummary = playersWithNemeses[0].NemePointsSummary;
                Assert.That(actualNemePointsSummary.GameDurationBonusNemePoints, Is.EqualTo(0));
                Assert.That(actualNemePointsSummary.BaseNemePoints, Is.EqualTo(0));
                Assert.That(actualNemePointsSummary.WeightBonusNemePoints, Is.EqualTo(0));
            }
        }