public void CachesRecursively()
 {
     var schema = new ObjectSchemaProvider<TestSchema>();
     Assert.Equal(true, schema.EntityHasField(typeof(TestSchema), "someRelation"));
     Assert.Equal(true, schema.EntityHasField(typeof(Person), "name"));
     Assert.Equal(true, schema.EntityHasField(typeof(TestEntity), "field1"));
 }
 public void CachesPublicProperties()
 {
     var schema = new ObjectSchemaProvider<TestEntity>();
     Assert.Equal(true, schema.EntityHasField(typeof(TestEntity), "id"));
     Assert.Equal(true, schema.EntityHasField(typeof(TestEntity), "Field1"));
     Assert.Equal(true, schema.EntityHasField(typeof(TestEntity), "relation"));
     Assert.Equal(false, schema.EntityHasField(typeof(TestEntity), "notthere"));
 }
 public void ReturnsActualName()
 {
     var schema = new ObjectSchemaProvider<TestEntity>();
     Assert.Equal("Id", schema.GetActualFieldName(typeof(TestEntity), "id"));
     Assert.Equal("Field1", schema.GetActualFieldName(typeof(TestEntity), "fiELd1"));
 }
 public void ReadsContextType()
 {
     var schema = new ObjectSchemaProvider<TestEntity>();
     Assert.Equal(typeof(TestEntity), schema.ContextType);
 }
 public void CachesPublicFields()
 {
     var schema = new ObjectSchemaProvider<Person>();
     Assert.Equal(true, schema.EntityHasField(typeof(Person), "id"));
     Assert.Equal(true, schema.EntityHasField(typeof(Person), "name"));
 }