public void AddViewToGame_IsCalledGetGameByKey_OneCall() { _gameRepository.Setup(m => m.First(It.IsAny <Expression <Func <Game, bool> > >())).Returns(_gameStub); _gameInfoRepository.Setup(m => m.GetItemById(It.IsAny <string>())).Returns(_gameInfoStub); _gameInfoRepository.Setup(m => m.Update(It.IsAny <GameInfo>())); _sut.AddViewToGame(_gameKey, It.IsAny <string>()); _gameRepository.Verify(x => x.First(It.IsAny <Expression <Func <Game, bool> > >()), Times.Exactly(2)); }