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); }
/// <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 }); }
public void Can_Export_Settings() { WorkflowSettingsExport settings = _repo.ExportSettings(); Assert.NotNull(settings); }