예제 #1
0
 public void Setup()
 {
     _command    = new SqlCommand();
     _dvco       = new DefaultValuesClassObject();
     _dataReader = CreateDataReader();
     _dataReader.Read();
 }
예제 #2
0
        public void FillObjectFromDataReader_GoodValues_Test()
        {
            _dvco = new DefaultValuesClassObject();

            DbAutoFillHelper.FillObjectFromDataReader(_dvco, _dataReader);

            Assert.AreEqual(_dvco.Parameter1, DATAREADER_PARAMETER_1_VALUE);
            Assert.AreEqual(_dvco.Parameter2, DATAREADER_PARAMETER_2_VALUE);
            Assert.AreEqual(_dvco.FromDBParameter, DATAREADER_FROMDBPARAMETER_VALUE);
            Assert.AreNotEqual(_dvco.NoneParameter, DATAREADER_NONEPARAMETER_VALUE);
            Assert.AreNotEqual(_dvco.ToDBParameter, DATAREADER_ToDBPARAMETER_VALUE);
        }
예제 #3
0
 public void Teardown()
 {
     _command.Dispose();
     _dvco = null;
     _dataReader.Dispose();
 }