public void TestNullableLongToNullableLong() { object input = (long?)5; long? output = NullableHelper.ConvertToNullable <long>(input); long? correct = 5; Assert.That(output, Is.EqualTo(correct)); }
public void TestDoubleToNullableDecimal() { object input = 5.4; decimal?output = NullableHelper.ConvertToNullable <decimal>(input); decimal?correct = 5.4M; Assert.That(output, Is.EqualTo(correct)); }
public void TestFloatToNullableDouble() { object input = 5.4F; double?output = NullableHelper.ConvertToNullable <double>(input); double?correct = (double)5.4F; Assert.That(output, Is.EqualTo(correct)); }
public void TestIntToNullableLong() { //making input an "object" to simulate the actual conditions //for this method's niche use case. object input = 5; long? output = NullableHelper.ConvertToNullable <long>(input); long? correct = 5; Assert.That(output, Is.EqualTo(correct)); }