public void Can_Export_UserGroups() { IEnumerable <UserGroupExport> userGroups = _repo.ExportUserGroups(); Assert.Empty(userGroups); Scaffold.Config(); userGroups = _repo.ExportUserGroups(); Assert.NotEmpty(userGroups); }
/// <summary> /// Export all workflow configuration. This is a simple representation of the current workflow database tables. /// </summary> /// <returns></returns> public Task <ImportExportModel> Export() { var model = new ImportExportModel { Settings = _repo.ExportSettings(), UserGroups = _repo.ExportUserGroups(), User2UserGroup = _repo.ExportUser2UserGroups(), UserGroupPermissions = _repo.ExportUserGroupPermissions() }; return(Task.FromResult(model)); }
/// <summary> /// Export all workflow configuration. This is a simple representation of the current workflow database tables. /// </summary> /// <returns></returns> public Task <ImportExportModel> Export() { var model = new ImportExportModel(); try { model.Settings = _repo.ExportSettings(); model.UserGroups = _repo.ExportUserGroups(); model.User2UserGroup = _repo.ExportUser2UserGroups(); model.UserGroupPermissions = _repo.ExportUserGroupPermissions(); } catch (Exception e) { _log.Error(GetType(), e.Message, e); } return(Task.FromResult(model)); }