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

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

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