Ejemplo n.º 1
0
 public GamesController(
     GamesCommandService gamesCommandService,
     GamesQueryService gamesQueryService)
 {
     _gamesCommandService = gamesCommandService;
     _gamesQueryService   = gamesQueryService;
 }
            protected override void Given()
            {
                _id = Guid.Empty;

                var game = new Game(_id);

                game.AddLocalTeam("RMD");
                game.AddForeignTeam("FCB");

                _gamesRepositoryMock = new Mock <IGamesRepository>();
                _gamesRepositoryMock
                .Setup(x => x.GetGame(_id))
                .Returns(game);
                var gamesRepository = _gamesRepositoryMock.Object;

                var gameToGameReportMapper = new GameToGameReportMapper();

                _sut = new GamesQueryService(gamesRepository, gameToGameReportMapper);
            }