Exemplo n.º 1
0
        public void GetValueNull()
        {
            DataReaderDataSourceAdapter <IDataReader> adapter = new DataReaderDataSourceAdapter <IDataReader>(_reader);
            IDataReader reader = GetReaderAtRow(adapter, 2);

            object actual = adapter.GetValue(reader, new AdapterBoundField <IDataReader>("Name"));

            Assert.IsNull(actual);
        }
Exemplo n.º 2
0
        public void GetValue()
        {
            DataReaderDataSourceAdapter <IDataReader> adapter = new DataReaderDataSourceAdapter <IDataReader>(_reader);
            IDataReader reader = GetReaderAtRow(adapter, 1);

            object actual = adapter.GetValue(reader, new AdapterBoundField <IDataReader>("Name"));

            Assert.AreEqual("Mickey Mouse", actual);
        }