public void TestSetNullOnDateTimeProperty() { Property prop = new Property(); prop.DateTime = DateTime.Now; // Property accessor datetimeSetAccessor.Set(prop, null); Assert.AreEqual(DateTime.MinValue, prop.DateTime); }
public void TestSetNullOnDecimalProperty() { Property prop = new Property(); prop.Decimal = 45.187M; // Property accessor decimalSetAccessor.Set(prop, null); Assert.AreEqual(0.0M, prop.Decimal); }
public void TestSetNullOnLongProperty() { Property prop = new Property(); prop.Long = 78945566664213223; // Property accessor longSetAccessor.Set(prop, null); Assert.AreEqual((long)0, prop.Long); }
public void TestSetNullOnStringProperty() { Property prop = new Property(); prop.String = "abc"; // Property accessor stringSetAccessor.Set(prop, null); Assert.IsNull(prop.String); }
public void TestSetNullOnNullableIntProperty() { Property prop = new Property(); prop.IntNullable = 85; // Property accessor nullableSetAccessor.Set(prop, null); Assert.AreEqual(null, prop.IntNullable); }
public void TestSetNullOnIntegerProperty() { Property prop = new Property(); prop.Int = -99; // Property accessor intSetAccessor.Set(prop, null); Assert.AreEqual(0, prop.Int); }
public void TestSetNullOnGuidField() { Property prop = new Property(); prop.publicGuid = Guid.NewGuid(); // Property accessor guidSetAccessor.Set(prop, null); Assert.AreEqual(Guid.Empty, prop.publicGuid); }
public void TestSetNullOnShortProperty() { Property prop = new Property(); prop.Short = 5; // Property accessor shortSetAccessor.Set(prop, null); Assert.AreEqual((short)0, prop.Short); }
public void TestSetNullOnDoubleField() { Property prop = new Property(); prop.publicDouble = 788956.56D; // Property accessor doubleSetAccessor.Set(prop, null); Assert.AreEqual(0.0D, prop.publicDouble); }
public void TestSetNullOnFloatField() { Property prop = new Property(); prop.publicFloat = 565.45F; // Property accessor floatSetAccessor.Set(prop, null); Assert.AreEqual(0.0D, prop.publicFloat); }
public void TestSetNullOnBoolField() { Property prop = new Property(); prop.publicBool = true; // Property accessor boolSetAccessor.Set(prop, null); Assert.AreEqual(false, prop.publicBool); }
public void TestSetNullOnULongField() { Property prop = new Property(); prop.publicUlong = 5L; // Property accessor ulongSetAccessor.Set(prop, null); Assert.AreEqual((ulong)0, prop.publicUlong); }
public void TestSetNullOnUIntField() { Property prop = new Property(); prop.publicUint = 5; // Property accessor uintSetAccessor.Set(prop, null); Assert.AreEqual((uint)0, prop.publicUint); }
public void TestSetNullOnUShortField() { Property prop = new Property(); prop.publicUshort = 5; // Property accessor ushortSetAccessor.Set(prop, null); Assert.AreEqual((ushort)0, prop.publicUshort); }
public void TestSetNullOnTimeSpanField() { Property prop = new Property(); prop.publicTimeSpan = new TimeSpan(5, 12, 57, 21, 13); // Property accessor timespanSetAccessor.Set(prop, null); Assert.AreEqual(new TimeSpan(0, 0, 0), prop.publicTimeSpan); }
public void TestSetNullOnCharProperty() { Property prop = new Property(); prop.Char = 'r'; // Property accessor charSetAccessor.Set(prop, null); Assert.AreEqual('\0', prop.Char); }
public void TestSetNullOnByteProperty() { Property prop = new Property(); prop.Byte = 78; // Property accessor byteSetAccessor.Set(prop, null); Assert.AreEqual((byte)0, prop.Byte); }
public void TestSetNullOnSbyteField() { Property prop = new Property(); prop.publicSbyte = 78; // Property accessor sbyteSetAccessor.Set(prop, null); Assert.AreEqual((sbyte)0, prop.publicSbyte); }
public void TestSetNullOnAccountField() { Property prop = new Property(); prop.publicAccount = new Account(); prop.publicAccount.FirstName = "test"; // Property accessor accountSetAccessor.Set(prop, null); Assert.AreEqual(null, prop.publicAccount); }
public void TestSetNullOnGuidField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedGuid"); fieldInfo.SetValue(prop, Guid.NewGuid()); // Property accessor guidSetAccessor.Set(prop, null); Assert.AreEqual(Guid.Empty, fieldInfo.GetValue(prop)); }
public void TestSetNullOnTimeSpanField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedTimeSpan"); fieldInfo.SetValue(prop, new TimeSpan(5, 12, 57, 21, 13)); // Property accessor timespanSetAccessor.Set(prop, null); Assert.AreEqual(new TimeSpan(0, 0, 0), fieldInfo.GetValue(prop)); }
public void TestSetNullOnDoubleField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedDouble"); fieldInfo.SetValue(prop, 788956.56D); // Property accessor doubleSetAccessor.Set(prop, null); Assert.AreEqual(0.0D, fieldInfo.GetValue(prop)); }
public void TestSetNullOnFloatField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedFloat"); fieldInfo.SetValue(prop, 565.45F); // Property accessor floatSetAccessor.Set(prop, null); Assert.AreEqual(0.0D, fieldInfo.GetValue(prop)); }
public void TestSetNullOnULongField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedUlong"); fieldInfo.SetValue(prop, (UInt64)5L); // Property accessor ulongSetAccessor.Set(prop, null); Assert.AreEqual((ulong)0, fieldInfo.GetValue(prop)); }
public void TestSetNullOnBoolField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedBool"); fieldInfo.SetValue(prop, true); // Property accessor boolSetAccessor.Set(prop, null); Assert.AreEqual(false, fieldInfo.GetValue(prop)); }
public void TestSetNullOnUIntField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedUint"); fieldInfo.SetValue(prop, (UInt32)5); // Property accessor uintSetAccessor.Set(prop, null); Assert.AreEqual((uint)0, fieldInfo.GetValue(prop)); }
public void TestSetNullOnShortField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedShort"); fieldInfo.SetValue(prop, (short)5); // Property accessor shortSetAccessor.Set(prop, null); Assert.AreEqual((short)0, fieldInfo.GetValue(prop)); }
public void TestSetNullOnCharField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedChar"); fieldInfo.SetValue(prop, 'r'); // Property accessor charSetAccessor.Set(prop, null); Assert.AreEqual('\0', fieldInfo.GetValue(prop)); }
public void TestSetNullOnByteField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedByte"); fieldInfo.SetValue(prop, (Byte)78); // Property accessor byteSetAccessor.Set(prop, null); Assert.AreEqual((byte)0, fieldInfo.GetValue(prop)); }
public void TestSetNullOnDecimalField() { Property prop = new Property(); FieldInfo fieldInfo = GetFieldInfo("protectedDecimal"); fieldInfo.SetValue(prop, 45.187M); // Property accessor decimalSetAccessor.Set(prop, null); Assert.AreEqual(0.0M, fieldInfo.GetValue(prop)); }