public void ToDb_NonNullString_ShouldStaySame() { object input = "xyz"; object o = DBNullHelper.ToDb(input); Assert.AreEqual(input, o); }
public void ToDb_NullReference_ShouldBecomeDBNull() { object input = null; // ReSharper disable ConditionIsAlwaysTrueOrFalse object o = DBNullHelper.ToDb(input); // ReSharper restore ConditionIsAlwaysTrueOrFalse Assert.AreEqual(DBNull.Value, o); }
public void ToDb_DBNullValue_ShouldStayDBNull() { object o = DBNullHelper.ToDb(DBNull.Value); Assert.AreEqual(DBNull.Value, o); }