Exemplo n.º 1
0
        public void QueryByNameTest()
        {
            IEnumerable <Win32Process> processes = ProcessHelper.ByName("System Idle Process");

            EnumerableAssert.Single(processes);
            processes = ProcessHelper.ByName("svchost.exe");
            EnumerableAssert.Multiple(processes);
        }
Exemplo n.º 2
0
 public void TableValuedFunctionTest()
 {
     using (AdventureWorks adventureWorks = new AdventureWorks())
     {
         IQueryable <ContactInformation> employees = adventureWorks.ufnGetContactInformation(1).Take(2);
         EnumerableAssert.Single(employees);
     }
 }
Exemplo n.º 3
0
 public void StoreProcedureWithMultipleResultsTest()
 {
     using (AdventureWorks adventureWorks = new AdventureWorks())
         using (IMultipleResults results = adventureWorks.uspGetCategoryAndSubcategory(1))
         {
             EnumerableAssert.Single(results.GetResult <ProductCategory>());
             EnumerableAssert.Any(results.GetResult <ProductSubcategory>());
         }
 }
Exemplo n.º 4
0
        public void QueryAllTest()
        {
            IEnumerable <Win32Process> processes = ProcessHelper.All();

            EnumerableAssert.Single(processes.Where(process => process.Name.EqualsOrdinal("System Idle Process")));
        }