Example #1
0
        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);
        }
Example #3
0
        public void EqualsWithString()
        {
            JsonSchema lhs = new JsonSchema();

            Assert.False(lhs.Equals("Not Equal"));
        }
Example #4
0
        public void EqualsWithNull()
        {
            JsonSchema lhs = new JsonSchema();

            Assert.False(lhs.Equals(null));
        }
Example #5
0
 public void EqualsWithString()
 {
     JsonSchema lhs = new JsonSchema();
     Assert.False(lhs.Equals("Not Equal"));
 }
Example #6
0
 public void EqualsWithNull()
 {
     JsonSchema lhs = new JsonSchema();
     Assert.False(lhs.Equals(null));
 }