public void ValidateDatabaseOptions_HasErrors() { var validator = new ValidateLicensingOptions <DatabaseOptions>(nameof(ApplicationOptions.Database)); var options = new DatabaseOptions(); var result = validator.Validate(null, options); Assert.True(result.Failed); }
public void ValidateDatabaseOptions_Valid() { var validator = new ValidateLicensingOptions <DatabaseOptions>(nameof(ApplicationOptions.Database)); var options = new DatabaseOptions() { ConnectionString = "test-con", Type = "Sqlite" }; var result = validator.Validate(null, options); Assert.True(result.Succeeded); }