public void Can_Export_User2UserGroups()
        {
            IEnumerable <User2UserGroupExport> user2UserGroups = _repo.ExportUser2UserGroups();

            Assert.Empty(user2UserGroups);

            Scaffold.Config();

            user2UserGroups = _repo.ExportUser2UserGroups();
            Assert.NotEmpty(user2UserGroups);
        }
Exemple #2
0
        /// <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));
        }