public void ReadDepartmentList() { UnitTestHelpers.ExecuteSQLCodeFromFile("SampleLinq2SqlUnitTesting.Tests.TestData.PopulateDepartmentTable.sql", "Linq2SqlDemoData"); var listOfDepartments = UnitTestHelpers.ReadDataFromTable <TestDTO.Department>("department", "Linq2SqlDemoData"); Assert.AreEqual(3, listOfDepartments.Count); Assert.AreEqual("Sales", listOfDepartments[0].Name); }
public void StoredProcedureTest() { UnitTestHelpers.ExecuteSQLCodeFromFile("SampleLinq2SqlUnitTesting.Tests.TestData.PopulateDepartmentTable.sql", "Linq2SqlDemoData"); var businessClass = new BusinessClass(); var result = businessClass.GetAllDepartments(); Assert.AreEqual(3, result.Count); }