Ejemplo n.º 1
0
        private void InitializeArena()
        {
            var repository = new SuperRepository(new SuperDatabaseContext());
            var arena      = new ChallengeArena(repository, new SlugFestFightStrategy(new Dice(100)));

            arena.FightLog = this;
            arena.Load(TeamNames.SuperFriends, TeamNames.LegionOfDoom);

            this.Arena = arena;

            this.Arena.PropertyChanged += this.Arena_PropertyChanged;
        }
Ejemplo n.º 2
0
        public void WhenConstructedWithNullRepository_ThenThrows()
        {
            // Arrange
            Mock <IFightStrategy> mockFightStrategy = new Mock <IFightStrategy>();

            ISuperRepository repository    = null;
            IFightStrategy   fightStrategy = mockFightStrategy.Object;

            // Act
            ChallengeArena actual = new ChallengeArena(repository, fightStrategy);

            // Assert
        }
Ejemplo n.º 3
0
        public void WhenConstructed_ThenInitialized()
        {
            // Arrange
            Mock <ISuperRepository> mockRepository    = new Mock <ISuperRepository>();
            Mock <IFightStrategy>   mockFightStrategy = new Mock <IFightStrategy>();

            ISuperRepository repository    = mockRepository.Object;
            IFightStrategy   fightStrategy = mockFightStrategy.Object;

            // Act
            ChallengeArena actual = new ChallengeArena(repository, fightStrategy);

            // Assert
            Assert.IsNotNull(actual);
        }