public void ServiceComponentService_GetById_IdExists_EntityReturned() { var result = _target.GetById(ServiceComponentId); Assert.IsNotNull(result); Assert.AreEqual(ServiceComponentId, result.Id); }
public ActionResult AddLevel2(string level, int id) { var vm = new AddServiceComponentLevel2ViewModel { EditLevel = level, ServiceComponentId = id, ServiceComponentName = _serviceComponentService.GetById(id).ComponentName }; vm.ReturnUrl = Url.Action("Edit", "ServiceComponent", new { level = vm.EditLevel, id = vm.ServiceComponentId }); return(View("Add" + level + "L2", vm)); }