public void WillRemoveDataIfTableHasRows() { CreateAndPopulateTable(schemaName, tableName, 5); tester.ClearTable(schemaName, tableName); Assert.AreEqual(0, tester.RowCount(schemaName, tableName)); }
public void RowCountReturnsNumberOfRowsFromTable() { var expectedCount = 5; CreateAndPopulateTable(schemaName, tableName, expectedCount); var actualCount = tester.RowCount(schemaName, tableName); Assert.AreEqual(expectedCount, actualCount); }
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); }