public void AttributeGetAllTest() { FeatureService service = getService(); Feature feature = new Feature(); feature.Type = FeatureTypes.STRING; feature.Name = "Color"; service.Add(feature); Feature feature2 = new Feature(); feature2.Type = FeatureTypes.STRING; feature2.Name = "Talle"; service.Add(feature2); List <Feature> allFeatures = service.GetAll(); Assert.AreEqual(2, allFeatures.Count()); Feature savedFeature = allFeatures.Find(ft => ft.Id == feature.Id); Assert.IsNotNull(savedFeature); Feature savedFeature2 = allFeatures.Find(ft => ft.Id == feature2.Id); Assert.IsNotNull(savedFeature2); }
public ActionResult EditRoleFeature() { RoleFeatureViewModel viewModel = new RoleFeatureViewModel() { Roles = roleSrv.GetAll().ToList(), Features = featSrv.GetAll().ToList() }; return(View(viewModel)); }
// GET: Features public ActionResult Index() { return(View(featSrv.GetAll().ToList())); }