Exemple #1
0
 public void ShouldGetAttributeNumber_WhenFloat()
 {
     Assert.AreEqual("\"number\"", SchemaTypeMapper.GetAttribute(typeof(float)));
 }
Exemple #2
0
 public void ShouldGetAttributeBoolean()
 {
     Assert.AreEqual("\"boolean\"", SchemaTypeMapper.GetAttribute(typeof(bool)));
 }
Exemple #3
0
 public void ShouldGetAttributeNumber_WhenDecimal()
 {
     Assert.AreEqual("\"number\"", SchemaTypeMapper.GetAttribute(typeof(decimal)));
 }
Exemple #4
0
 public void ShouldGetAttributeInteger()
 {
     Assert.AreEqual("\"integer\"", SchemaTypeMapper.GetAttribute(typeof(int)));
 }
Exemple #5
0
 public void ShouldGetAttributeString()
 {
     Assert.AreEqual("\"string\"", SchemaTypeMapper.GetAttribute(typeof(string)));
 }
Exemple #6
0
 public void ShouldGetAttributeString_WhenNullableDateTime()
 {
     Assert.AreEqual("\"string\"", SchemaTypeMapper.GetAttribute(typeof(DateTime?)));
 }
Exemple #7
0
 public void ShouldGetAttributeNumber_WhenNullableFloat()
 {
     Assert.AreEqual("[\"number\",\"null\"]", SchemaTypeMapper.GetAttribute(typeof(float?)));
 }
Exemple #8
0
 public void ShouldGetAttributeBoolean_WhenNullable()
 {
     Assert.AreEqual("[\"boolean\",\"null\"]", SchemaTypeMapper.GetAttribute(typeof(bool?)));
 }
Exemple #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?)));
 }