示例#1
0
 public void ShouldGetAttributeNumber_WhenFloat()
 {
     Assert.AreEqual("\"number\"", SchemaTypeMapper.GetAttribute(typeof(float)));
 }
示例#2
0
 public void ShouldGetAttributeBoolean()
 {
     Assert.AreEqual("\"boolean\"", SchemaTypeMapper.GetAttribute(typeof(bool)));
 }
示例#3
0
 public void ShouldGetAttributeNumber_WhenDecimal()
 {
     Assert.AreEqual("\"number\"", SchemaTypeMapper.GetAttribute(typeof(decimal)));
 }
示例#4
0
 public void ShouldGetAttributeInteger()
 {
     Assert.AreEqual("\"integer\"", SchemaTypeMapper.GetAttribute(typeof(int)));
 }
示例#5
0
 public void ShouldGetAttributeString()
 {
     Assert.AreEqual("\"string\"", SchemaTypeMapper.GetAttribute(typeof(string)));
 }
示例#6
0
 public void ShouldGetAttributeString_WhenNullableDateTime()
 {
     Assert.AreEqual("\"string\"", SchemaTypeMapper.GetAttribute(typeof(DateTime?)));
 }
示例#7
0
 public void ShouldGetAttributeNumber_WhenNullableFloat()
 {
     Assert.AreEqual("[\"number\",\"null\"]", SchemaTypeMapper.GetAttribute(typeof(float?)));
 }
示例#8
0
 public void ShouldGetAttributeBoolean_WhenNullable()
 {
     Assert.AreEqual("[\"boolean\",\"null\"]", SchemaTypeMapper.GetAttribute(typeof(bool?)));
 }
示例#9
0
 public void ShouldGetAttributeInteger_WhenNullable()
 {
     Assert.AreEqual("[\"integer\",\"null\"]", SchemaTypeMapper.GetAttribute(typeof(int?)));
 }
 public void ShouldGetAttributeNumber_WhenNullableDecimal()
 {
     Assert.Equal("[\"number\",\"null\"]", SchemaTypeMapper.GetAttribute(typeof(decimal?)));
 }