public void EqualityTests(EqualityTestCase test) { JsonSchema left = SchemaReader.ReadSchema(test.Left, TestUtil.TestFilePath + ".left"); JsonSchema right = SchemaReader.ReadSchema(test.Right, TestUtil.TestFilePath + ".right"); left.Equals(right).Should().Be(test.ShouldBeEqual); (left == right).Should().Be(test.ShouldBeEqual); (left != right).Should().Be(!test.ShouldBeEqual); }
public static JSBSchema BuildSchema(JsonSchema jsonSchema) { if (jsonSchema.Equals(JsonSchema.Empty)) { return(new JSBSchema("NoValidation", "Represents an empty schema with disabled validation")); } IJSBPart topPart = null; //TODO build from the schema JSBSchema jsonSchemaBuilderSchema = new JSBSchema(jsonSchema.Id, jsonSchema.Description(), topPart); return(jsonSchemaBuilderSchema); }
public void EqualsWithString() { JsonSchema lhs = new JsonSchema(); Assert.False(lhs.Equals("Not Equal")); }
public void EqualsWithNull() { JsonSchema lhs = new JsonSchema(); Assert.False(lhs.Equals(null)); }