Exemple #1
0
        public void GetsExpectedData2()
        {
            string expectedName = "bob";
            string query        = string.Format("select * from Widgets where name = '{0}'", expectedName);
            var    source       = new SQLiteSource(TestDataHelper.TestConnectionString, query);
            var    results      = source.GetData();

            Assert.NotNull(results);
            Assert.Equal(TestDataHelper.Names.Count(n => n == expectedName), results.Rows.Count);
            Assert.Equal(expectedName, results.Rows[0]["Name"]);
        }
Exemple #2
0
        public void GetsExpectedData()
        {
            string query   = "select * from Widgets";
            var    source  = new SQLiteSource(TestDataHelper.TestConnectionString, query);
            var    results = source.GetData();

            Assert.NotNull(results);
            Assert.Equal(TestDataHelper.Names.Length, results.Rows.Count);
            for (int i = 0; i < TestDataHelper.Names.Length; i++)
            {
                Assert.Equal(TestDataHelper.Names[i], results.Rows[i]["Name"]);
            }
        }