public void OperationalProcessTypeRefDataService_GetAllAndNotVisibleForCustomer_ResultsMerged_AllVisibleIncluded() { var resultIds = _operationalProcessTypeRefDataService .GetAllAndNotVisibleForCustomer(CustomerId) .Select(s => s.Id) .ToList(); var expectedIds = _operationalProcessTypeRefDatas .Where(x => x.Visible) .Select(s => s.Id) .ToList(); Assert.IsTrue(!expectedIds.Except(resultIds).Any()); }
public ActionResult Index(string level) { _operationalProcessTypeRefDataService.PurgeOrphans(); //TODO: This needs to change now to show only the active resolver groups, any operational processes changes will be applied // to the resolvers containing the group var model = new ViewProcessDotMatrixViewModel { EditLevel = level }; // Add the column for holding the ResolverId, which is actually the ServiceComponentId. model.Columns.Add(new DynamicGridColumn { Name = DotMatrixNames.ResolverId, Title = DotMatrixNames.ResolverId, Type = typeof(int), Visible = false, Editable = false }); // Add the column for holding the Resolver Group name and Service Component Name model.Columns.Add(new DynamicGridColumn { Name = DotMatrixNames.ResolverName, Title = "Resolver Group", Type = typeof(string), Editable = false }); model.Columns.Add(new DynamicGridColumn { Name = DotMatrixNames.ComponentName, Title = "Service Component", Type = typeof(string), Editable = false }); // Now is the dynamic part. Need to have a column for all of the Operational Processes. var processes = _operationalProcessTypeRefDataService .GetAllAndNotVisibleForCustomer(_appUserContext.Current.CurrentCustomer.Id) .OrderBy(o => o.SortOrder); processes.ForEach(f => model.Columns.Add(new DynamicGridColumn { Name = string.Concat(DotMatrixNames.OpIdPrefix, f.Id), Title = f.OperationalProcessTypeName, Type = typeof(bool) })); return(View("DotMatrix" + level, model)); }