Esempio n. 1
0
        public void Query_Dynamic_TestData_MappsCorrectly()
        {
            using (var mapper = new RelationalDataMapper(_connFact))
            {
                var data = mapper.Query("select * from things").ToList();

                var name5 = (string)data[5].Name;
                var int6 = (int)data[6].Frequency;

                Assert.That(data.Count, Is.EqualTo(100));
                Assert.That(name5, Is.EqualTo("Name 5"));
                Assert.That(int6, Is.EqualTo(6));
            }
        }
Esempio n. 2
0
        public async Task QueryAsync_Types_TestData_MappsCorrectly()
        {
            using (var mapper = new RelationalDataMapper(_connFact))
            {
                var data = (await mapper.QueryAsync<Things>()).ToList();

                var name5 = (string)data[5].Name;
                var int6 = (int)data[6].Frequency;

                Assert.That(data.Count, Is.EqualTo(100));
                Assert.That(name5, Is.EqualTo("Name 5"));
                Assert.That(int6, Is.EqualTo(6));
            }
        }