public void IsValidInvalidDefault() { ConfigurationDefinition config = new ConfigurationDefinition("form", "{ \"schema\": \"\" }", typeof(int), "test"); IResult <bool> result = config.IsValid(); Assert.False(result.ReturnValue); Assert.True(result.GetLastError().Contains("Default")); }
public void IsValidInvalidSchema() { ConfigurationDefinition config = new ConfigurationDefinition("{ \"form\": \"\" }", "schema", typeof(int), 1); IResult <bool> result = config.IsValid(); Assert.False(result.ReturnValue); Assert.True(result.GetLastError().Contains("Schema")); }
public void IsValidInvalidModel() { ConfigurationDefinition config = new ConfigurationDefinition("form", "{ \"schema\": \"\" }", null, null); IResult <bool> result = config.IsValid(); Assert.False(result.ReturnValue); Assert.True(result.GetLastError().Contains("Model")); }
public void IsValid() { ConfigurationDefinition config = new ConfigurationDefinition("{ \"form\": \"\" }", "{ \"schema\": \"\" }", typeof(int), 1); Assert.True(config.IsValid().ReturnValue); }