コード例 #1
0
        public void ItRequiresThatThePlayerHasNemesisDataPopulated()
        {
            Player player = new Player();
            MinionViewModelBuilder builder = new MinionViewModelBuilder();

            var exception = Assert.Throws <ArgumentException>(() =>
                                                              builder.Build(player));

            Assert.AreEqual(MinionViewModelBuilder.EXCEPTION_NEMESIS_CANNOT_BE_NULL, exception.Message);
        }
コード例 #2
0
        public void SetUp()
        {
            builder = new MinionViewModelBuilder();
            player  = new Player()
            {
                Id      = 999,
                Name    = "minion player name",
                Nemesis = new Nemesis()
                {
                    LossPercentage    = 15,
                    NumberOfGamesLost = 150
                }
            };

            viewModelResult = builder.Build(player);
        }