public ActionResult Index() { var superPowerfuls = _superPowerfulService.GetAllSuperPowerfulsAndClassify(); ViewBag.ResultFromClassify = (superPowerfuls.Heroes.Count > 0 || superPowerfuls.Villians.Count > 0) ? _superPowerfulService.AddVilliansAndHeroes(superPowerfuls.Villians, superPowerfuls.Heroes) : "Sin elementos a clasificar"; return(this.View(HomeControllerAction.Index, superPowerfuls)); }
public void Superpowerfuls_Classifieds_By_Villians_And_Heroes_And_All() { //Arrange _mockSuperPowerfulRepository.Setup(x => x.GetAll()).Returns(superPowerfuls); //Act superPowerfulsOutput = _service.GetAllSuperPowerfulsAndClassify(); //Assert Assert.IsNotNull(superPowerfulsOutput); Assert.IsNotNull(superPowerfulsOutput.Heroes); Assert.IsNotNull(superPowerfulsOutput.SuperPowerFul); Assert.IsNotNull(superPowerfulsOutput.Villians); Assert.AreEqual(4, superPowerfulsOutput.Heroes.Count); Assert.AreEqual(3, superPowerfulsOutput.Villians.Count); Assert.AreEqual(7, superPowerfulsOutput.SuperPowerFul.Count); }