Exemplo n.º 1
0
        public void ItRequiresAPlayerGameResult()
        {
            var exception = Assert.Throws <ArgumentNullException>(() =>
                                                                  builder.Build(null)
                                                                  );

            Assert.AreEqual("playerGameResult", exception.ParamName);
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            builder = new GameResultViewModelBuilder();
            GameDefinition gameDefinition = new GameDefinition()
            {
                Id   = 15131,
                Name = "Yodle-masters 2014"
            };
            PlayedGame playedGame = new PlayedGame()
            {
                GameDefinition = gameDefinition,
                DatePlayed     = new DateTime(2014, 09, 15),
                WinnerType     = WinnerTypes.TeamWin
            };

            playerGameResult = new PlayerGameResult()
            {
                GameRank = 1,
                NemeStatsPointsAwarded = 2,
                Id       = 151,
                PlayerId = 15135,
                Player   = new Player()
                {
                    Name   = "Test Player",
                    Active = false
                },
                PlayedGameId = 1432,
                PlayedGame   = playedGame
            };

            playerGameResultDetails = builder.Build(playerGameResult);
        }