public void RunWarsReturns_WithNoVictor_WhenNameIsOptimusVsPredaking()
        {
            using (var context = getDBContext())
            {
                Models.DB.Transformer autoBotTransformer = new Models.DB.Transformer()
                {
                    Name             = "Optimus",
                    AllegianceTypeId = (int)AllegianceTypes.Autobot,
                    Courage          = 10,
                    Endurance        = 10,
                    Firepower        = 10,
                    Intelligence     = 10,
                    Rank             = 10,
                    Skill            = 10,
                    Speed            = 10,
                    Strength         = 10
                };

                Models.DB.Transformer decepticonTransformer = new Models.DB.Transformer()
                {
                    Name             = "Predaking",
                    AllegianceTypeId = (int)AllegianceTypes.Decepticon,
                    Courage          = 1,
                    Endurance        = 1,
                    Firepower        = 1,
                    Intelligence     = 1,
                    Rank             = 1,
                    Skill            = 1,
                    Speed            = 1,
                    Strength         = 1
                };
                context.Transformers.Add(autoBotTransformer);
                context.Transformers.Add(decepticonTransformer);
                context.SaveChanges();


                var warsService = new WarService(context, _mockLogger.Object);
                var warResult   = warsService.RunWar().Result;
                Assert.Equal(0, warResult.Autobots.Victors.Count);
                Assert.Equal(0, warResult.Decepticon.Victors.Count);

                context.Database.EnsureDeleted();
            }
        }
        public void RunWarsReturns_WithResult()
        {
            using (var context = getDBContext())
            {
                Models.DB.Transformer transformer = new Models.DB.Transformer()
                {
                    Name             = "Optimus",
                    AllegianceTypeId = (int)AllegianceTypes.Autobot,
                    Courage          = 10,
                    Endurance        = 9,
                    Firepower        = 1,
                    Intelligence     = 3,
                    Rank             = 1,
                    Skill            = 1,
                    Speed            = 4,
                    Strength         = 2
                };
                context.Transformers.Add(transformer);

                transformer = new Models.DB.Transformer()
                {
                    Name             = "Decepticon#4",
                    AllegianceTypeId = (int)AllegianceTypes.Decepticon,
                    Rank             = 4,
                    Strength         = 10,
                    Intelligence     = 9,
                    Speed            = 1,
                    Endurance        = 2,
                    Courage          = 3,
                    Firepower        = 4,
                    Skill            = 5
                };
                context.Transformers.Add(transformer);

                transformer = new Models.DB.Transformer()
                {
                    Name             = "Autobot#10",
                    AllegianceTypeId = (int)AllegianceTypes.Autobot,
                    Rank             = 10,
                    Strength         = 10,
                    Intelligence     = 9,
                    Speed            = 1,
                    Endurance        = 2,
                    Courage          = 3,
                    Firepower        = 4,
                    Skill            = 5
                };
                context.Transformers.Add(transformer);

                context.SaveChanges();


                var warsService = new WarService(context, _mockLogger.Object);
                var warResult   = warsService.RunWar().Result;
                Assert.Equal(0, warResult.Autobots.Losers.Count);
                Assert.Equal(1, warResult.Autobots.Victors.Count);
                Assert.Equal(1, warResult.Autobots.Survivors.Count);
                Assert.Equal(1, warResult.Decepticon.Losers.Count);
                Assert.Equal(0, warResult.Decepticon.Victors.Count);
                Assert.Equal(0, warResult.Decepticon.Survivors.Count);

                context.Database.EnsureDeleted();
            }
        }