public void GetValue_ShouldReturnValue () { var columnID = new ColumnID ("Name", 0); var scalarRowWrapper = new ScalarRowWrapper (_readerMock); _readerMock .Expect (mock => mock.GetValue (columnID.Position)) .Return ("Peter"); var value = scalarRowWrapper.GetValue<string> (columnID); _readerMock.VerifyAllExpectations(); Assert.That ("Peter", Is.EqualTo (value)); }
public void GetValue_ShouldReturnValue() { var columnID = new ColumnID("Name", 0); var scalarRowWrapper = new ScalarRowWrapper(_readerMock); _readerMock .Expect(mock => mock.GetValue(columnID.Position)) .Return("Peter"); var value = scalarRowWrapper.GetValue <string> (columnID); _readerMock.VerifyAllExpectations(); Assert.That("Peter", Is.EqualTo(value)); }
public void GetValue_ShouldThrowException () { var scalarRowWrapper = new ScalarRowWrapper (_readerMock); scalarRowWrapper.GetValue<string> (new ColumnID ("Name", 1)); }
public void GetValue_ShouldThrowException() { var scalarRowWrapper = new ScalarRowWrapper(_readerMock); scalarRowWrapper.GetValue <string> (new ColumnID("Name", 1)); }