public void Setup() { _command = new SqlCommand(); _dvco = new DefaultValuesClassObject(); _dataReader = CreateDataReader(); _dataReader.Read(); }
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); }
public void Teardown() { _command.Dispose(); _dvco = null; _dataReader.Dispose(); }