public void QueryByNameTest() { IEnumerable <Win32Process> processes = ProcessHelper.ByName("System Idle Process"); EnumerableAssert.Single(processes); processes = ProcessHelper.ByName("svchost.exe"); EnumerableAssert.Multiple(processes); }
public void TableValuedFunctionTest() { using (AdventureWorks adventureWorks = new AdventureWorks()) { IQueryable <ContactInformation> employees = adventureWorks.ufnGetContactInformation(1).Take(2); EnumerableAssert.Single(employees); } }
public void StoreProcedureWithMultipleResultsTest() { using (AdventureWorks adventureWorks = new AdventureWorks()) using (IMultipleResults results = adventureWorks.uspGetCategoryAndSubcategory(1)) { EnumerableAssert.Single(results.GetResult <ProductCategory>()); EnumerableAssert.Any(results.GetResult <ProductSubcategory>()); } }
public void QueryAllTest() { IEnumerable <Win32Process> processes = ProcessHelper.All(); EnumerableAssert.Single(processes.Where(process => process.Name.EqualsOrdinal("System Idle Process"))); }