示例#1
0
        public void WillRemoveDataIfTableHasRows()
        {
            CreateAndPopulateTable(schemaName, tableName, 5);

            tester.ClearTable(schemaName, tableName);

            Assert.AreEqual(0, tester.RowCount(schemaName, tableName));
        }
示例#2
0
        public void RowCountReturnsNumberOfRowsFromTable()
        {
            var expectedCount = 5;

            CreateAndPopulateTable(schemaName, tableName, expectedCount);

            var actualCount = tester.RowCount(schemaName, tableName);

            Assert.AreEqual(expectedCount, actualCount);
        }
示例#3
0
        public void InsertDataCanInsertOneRow()
        {
            var expectedCount = 1;
            var schemaName    = "dbo";
            var tableName     = "testtable";

            DropAndCreateTestTable(schemaName, tableName, "[col1] int");
            var columns = new string[] { "col1" };
            var data    = new object[]
            {
                new object[] { 1 }
            };


            tester.InsertData(schemaName, tableName, columns, data);


            var actualCount = tester.RowCount(schemaName, tableName);

            Assert.AreEqual(expectedCount, actualCount);
        }