BusinessLogic.Tests.UnitTests.LogicTests.ChampionsTests.ChampionRecalculatorTests.RecalculateChampionTests.ItDoesntSaveTheChampionIfNothingChanged C# (CSharp) Method

ItDoesntSaveTheChampionIfNothingChanged() private method

private ItDoesntSaveTheChampionIfNothingChanged ( ) : void
return void
        public void ItDoesntSaveTheChampionIfNothingChanged()
        {
            int championPlayerId = 1;
            int winPercentage = 1;
            ChampionData championData = new ChampionData
            {
                GameDefinitionId = _gameDefinitionId,
                PlayerId = championPlayerId,
                WinPercentage = winPercentage
            };

            _autoMocker.Get<IChampionRepository>().Expect(mock => mock.GetChampionData(_gameDefinitionId))
                .Return(championData);

            List<Champion> championList = new List<Champion>();
            championList.Add(new Champion
            {
                Id = _previousChampionId,
                PlayerId = championPlayerId,
                GameDefinitionId = _gameDefinitionId,
                WinPercentage = winPercentage,
                GameDefinition = new GameDefinition { ChampionId = _previousChampionId }
            });
            _autoMocker.Get<IDataContext>().Expect(mock => mock.GetQueryable<Champion>())
                .Return(championList.AsQueryable());

            _autoMocker.ClassUnderTest.RecalculateChampion(_gameDefinitionId, _applicationUser);

            _autoMocker.Get<IDataContext>().AssertWasNotCalled(mock => mock.Save(
                Arg<Champion>.Is.Anything,
                Arg<ApplicationUser>.Is.Anything));
        }