public void Where_WhenOperandPrecedenceIsInversed_CompletedSuccessfully()
        {
            var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(e => "EPBYMINW3594" == e.workstation))
            {
                _outputHelper.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }
        }
        public void Where_WhenEndsWithOperationIsUsed_QueryIsExecutedSuccessfully()
        {
            var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(e => e.workstation.EndsWith("94")))
            {
                _outputHelper.WriteLine("{0} {1} {2}", emp.nativename, emp.startworkdate, emp.workstation);
            }
        }
Exemplo n.º 3
0
        public void WithProvider_Contains()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(new SettingsProvider());

            foreach (var emp in employees.Where(e => e.WorkStation.Contains("64")))
            {
                Console.WriteLine($"{emp.FirstName} {emp.LastName}: {emp.WorkStation}{Environment.NewLine}");
            }
        }
        public void WithProvider()
        {
            var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(e => e.workstation == "EPBYMINW3594"))
            {
                _outputHelper.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }
        }
Exemplo n.º 5
0
        public void WithProvider_AndAlso()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(new SettingsProvider());

            foreach (var emp in employees.Where(e => e.WorkStation.StartsWith("EPBYMINW664") && e.FirstName == "Natalia"))
            {
                Console.WriteLine($"{emp.FirstName} {emp.LastName}: {emp.WorkStation}{Environment.NewLine}");
            }
        }
Exemplo n.º 6
0
        public void StatementAndTest()
        {
            var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(e => "EPBYMINW5386" == e.workstation && e.nativename.StartsWith("Анд")))
            {
                Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }
        }
Exemplo n.º 7
0
        public void WithProvider_Equal_ReverseOrder()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(new SettingsProvider());

            foreach (var emp in employees.Where(e => "EPBYMINW6641" == e.WorkStation))
            {
                Console.WriteLine("{0} {1}", emp.NativeName, emp.StartWorkDate);
            }
        }
        public void WithProvider()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(e => e.workStation == "EPRUIZHW0249"))
            {
                Debug.WriteLine("{0} {1}", emp.nativeName, emp.shortStartWorkDate);
            }
        }
Exemplo n.º 9
0
        public void StringContainsTest()
        {
            var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(e => e.workstation.Contains("NW538")))
            {
                Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }
        }
Exemplo n.º 10
0
        public void WithProvider()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(searchService.Value);

            foreach (var emp in employees.Where(e => e.Workstation == "EPRUIZHW0249"))
            {
                Console.WriteLine("{0} {1}", emp.NativeName, emp.StartWorkDate);
            }
        }
Exemplo n.º 11
0
        public void WithProvider()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(User, Password);

            foreach (var emp in employees.Where(e => e.workStation == "EPBYBREW0165"))
            {
                Console.WriteLine($"{emp.nativeName} {emp.shortStartWorkDate}");
            }
        }
Exemplo n.º 12
0
        public void E3SEntitySet_Where_Field_Equals_Const()
        {
            //Arrange
            var employees = new E3SEntitySet <EmployeeEntity>(User, Password);
            var query     = employees.Where(e => e.workStation == "EPBYBREW0165");

            //Act
            var employee = query.ToList();

            //Assert
            Assert.AreEqual("Игорь Салженицин", employee.FirstOrDefault()?.nativeName);
            Assert.AreEqual("2000-08-01", employee.FirstOrDefault()?.shortStartWorkDate);
        }
Exemplo n.º 13
0
        public void E3SEntitySet_Where_StartsWith()
        {
            //Arrange
            var employees = new E3SEntitySet <EmployeeEntity>(User, Password);
            var query     = employees.Where(e => e.workStation.StartsWith("EPBYBREW016"));

            //Act
            var employee = query.ToList();

            //Assert
            var actual = employee.FirstOrDefault(x => string.Equals("EPBYBREW0165", x.workStation));

            Assert.AreEqual("Игорь Салженицин", actual?.nativeName);
            Assert.AreEqual("2000-08-01", actual?.shortStartWorkDate);
        }
        public void Where_Equals_RightOrderOfParams_Test()
        {
            var expectedQueryString    = "workstation:(EPRUIZHW006)";
            var expectedRequestQueries = new string[] { expectedQueryString };

            var filteredEmployees = _employees.Where(e => e.workstation == "EPRUIZHW006").ToList();

            A.CallTo(() => _client.SearchFTS(A <Type> ._, A <IEnumerable <string> > .That.Matches(array => array.SequenceEqual(expectedRequestQueries)), A <int> ._, A <int> ._))
            .MustHaveHappened();
        }
Exemplo n.º 15
0
 public void WithProvider()
 {
     var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);
     /*
     foreach (var emp in employees.Where(e => e.workstation == "EPRUIZHW0060"))
     {
         Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
     }
     foreach (var emp in employees.Where(e => "EPRUIZHW0060" == e.workstation))
     {
         Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
     }
     */
     foreach (var emp in employees.Where(e => e.workstation == "EPRUIZHW0060"
     && e.workstation.Contains("IZHW006")
     && e.workstation.EndsWith("IZHW0060")
     && e.workstation.StartsWith("EPRUIZHW006")))
     {
         Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
     }
 }
        public void Where_WhenEqualsAndAndOperatorAreUsed_QueryIsExecutedSuccessfully()
        {
            var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            foreach (var emp in employees.Where(
                e => e.workstation.Contains("EPBY") &&
                     e.workstation == "EPBYMINW3594"))
            {
                _outputHelper.WriteLine("{0} {1} {2}", emp.nativename, emp.startworkdate, emp.workstation);
            }
        }