public void SetSqlNullFieldValueTest() { TestFieldValues val = new TestFieldValues(); DateTime d0 = DateTime.Now.Date; val.SetFieldValue(5, null); val.SetFieldValue(6, null); val.SetFieldValue(7, null); val.SetFieldValue(8, null); val.SetFieldValue(9, null); Assert.AreEqual(SqlInt32.Null, val.A1); Assert.AreEqual(SqlString.Null, val.B1); Assert.AreEqual(SqlDateTime.Null, val.C1); Assert.AreEqual(SqlBoolean.Null, val.D1); Assert.AreEqual(SqlDecimal.Null, val.E1); }
public void SetSqlNotNullFieldValueTest() { TestFieldValues val = new TestFieldValues(); DateTime d0 = DateTime.Now.Date; val.SetFieldValue(5, 3); val.SetFieldValue(6, "ala ma kota"); val.SetFieldValue(7, d0); val.SetFieldValue(8, true); val.SetFieldValue(9, 100.0m); Assert.AreEqual((SqlInt32)3, val.A1); Assert.AreEqual((SqlString)"ala ma kota", val.B1); Assert.AreEqual((SqlDateTime)d0, val.C1); Assert.AreEqual((SqlBoolean)true, val.D1); Assert.AreEqual((SqlDecimal)100.0m, val.E1); }
public void SetPlainFieldValueTest() { TestFieldValues val = new TestFieldValues(); DateTime d0 = DateTime.Now.Date; val.SetFieldValue(0, 3); val.SetFieldValue(1, "ala ma kota"); val.SetFieldValue(2, d0); val.SetFieldValue(3, true); val.SetFieldValue(4, 100.0m); Assert.AreEqual(3, val.A); Assert.AreEqual("ala ma kota", val.B); Assert.AreEqual(d0, val.C); Assert.AreEqual(true, val.D); Assert.AreEqual(100.0m, val.E); }
public void SetSqlNullFieldValueTest() { TestFieldValues val = new TestFieldValues(); DateTime d0 = DateTime.Now.Date; val.SetFieldValue(5, null); val.SetFieldValue(6, null); val.SetFieldValue(7, null); val.SetFieldValue(8, null); val.SetFieldValue(9, null); Assert.AreEqual(SqlInt32.Null, val.A1); Assert.AreEqual(SqlString.Null, val.B1); Assert.AreEqual(SqlDateTime.Null, val.C1); Assert.AreEqual(SqlBoolean.Null, val.D1); Assert.AreEqual(SqlDecimal.Null, val.E1); }
public void SetSqlNotNullFieldValueTest() { TestFieldValues val = new TestFieldValues(); DateTime d0 = DateTime.Now.Date; val.SetFieldValue(5, 3); val.SetFieldValue(6, "ala ma kota"); val.SetFieldValue(7, d0); val.SetFieldValue(8, true); val.SetFieldValue(9, 100.0m); Assert.AreEqual((SqlInt32)3, val.A1); Assert.AreEqual((SqlString)"ala ma kota", val.B1); Assert.AreEqual((SqlDateTime)d0, val.C1); Assert.AreEqual((SqlBoolean)true, val.D1); Assert.AreEqual((SqlDecimal)100.0m, val.E1); }
public void SetPlainFieldValueTest() { TestFieldValues val = new TestFieldValues(); DateTime d0 = DateTime.Now.Date; val.SetFieldValue(0, 3); val.SetFieldValue(1, "ala ma kota"); val.SetFieldValue(2, d0); val.SetFieldValue(3, true); val.SetFieldValue(4, 100.0m); Assert.AreEqual(3, val.A); Assert.AreEqual("ala ma kota", val.B); Assert.AreEqual(d0, val.C); Assert.AreEqual(true, val.D); Assert.AreEqual(100.0m, val.E); }