Exemplo n.º 1
0
 public void ValidateDictionaryEntityGetTypes()
 {
     Assert.That(fullEntity.GetBinary("binary"), Is.InstanceOf(typeof(byte[])));
     Assert.That(fullEntity.GetBoolean("boolean"), Is.InstanceOf(typeof(bool?)));
     Assert.That(fullEntity.GetDateTime("datetime"), Is.InstanceOf(typeof(DateTime?)));
     Assert.That(fullEntity.GetDouble("double"), Is.InstanceOf(typeof(double?)));
     Assert.That(fullEntity.GetGuid("guid"), Is.InstanceOf(typeof(Guid)));
     Assert.That(fullEntity.GetInt32("int32"), Is.InstanceOf(typeof(int?)));
     Assert.That(fullEntity.GetInt64("int64"), Is.InstanceOf(typeof(long?)));
     Assert.That(fullEntity.GetString("string"), Is.InstanceOf(typeof(string)));
 }
Exemplo n.º 2
0
 public void ValidateDictionaryEntityGetTypeForNulledProperties()
 {
     Assert.That(emptyEntity.GetBinary(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetBoolean(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetDateTime(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetDouble(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetGuid(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetInt32(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetInt64(nulledPropertyKey), Is.Null);
     Assert.That(emptyEntity.GetString(nulledPropertyKey), Is.Null);
 }