public void Can_Export_Settings()
        {
            WorkflowSettingsExport settings = _repo.ExportSettings();

            Assert.NotNull(settings);
            Assert.Null(settings.DefaultApprover);

            Scaffold.Config();
            settings = _repo.ExportSettings();
            Assert.NotNull(settings);
            Assert.Equal("12", settings.DefaultApprover);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Import the settings export model back into the database. This is destructive.
 /// </summary>
 /// <param name="model">Object of type <see cref="WorkflowSettingsExport"/></param>
 public void ImportSettings(WorkflowSettingsExport model)
 {
     // delete first as this is an import and should be destructive
     _database.Execute("DELETE FROM WorkflowSettings");
     _database.Insert(new WorkflowSettingsPoco
     {
         DefaultApprover   = model.DefaultApprover,
         EditUrl           = model.EditUrl,
         Email             = model.Email,
         ExcludeNodes      = model.ExcludeNodes,
         FlowType          = model.FlowType,
         SendNotifications = model.SendNotifications,
         SiteUrl           = model.SiteUrl
     });
 }
Exemplo n.º 3
0
        public void Can_Export_Settings()
        {
            WorkflowSettingsExport settings = _repo.ExportSettings();

            Assert.NotNull(settings);
        }