Example #1
0
        public void Integration_ProjectInstaller_MWS_Build_returns_container()
        {
            // Arrange
            frb = new FluentRecordBase();
            var bootstrapper = new InstallBootstrapper();
            IUnityContainer container = bootstrapper.Build();
            // Act
            IEnumerable<Installer> result = container.ResolveAll<Installer>();

            // Assert
            Assert.AreEqual(2, result.ToArray().Count(), "InstallBootstrapper for service does not return expected number of objects");
        }
Example #2
0
 public void TestInitialize()
 {
     frb = new FluentRecordBase();
     dOptions = new viewOptions
     {
         CI = new CultureInfo("en-US", false),
         sSearch = "",
         date = DateTime.Today,
         dwccardnum = null,
         woid = null,
         orderDescending = false,
         sortColName = "",
         displayStart = 0,
         displayLength = 20
     };
 }
Example #3
0
 public void SetupTest()
 {
     frb = new FluentRecordBase();
     driver = new ChromeDriver(ConfigurationManager.AppSettings["CHROMEDRIVERPATH"]);
     baseURL = "http://localhost:4213/";
     ui = new sharedUI(driver, baseURL);
     verificationErrors = new StringBuilder();
     ui.login();
 }
 public void TestCleanup()
 {
     frb = null;
 }
 public void TestInitialize()
 {
     frb = new FluentRecordBase();
 }
Example #6
0
 public void TestInitialize()
 {
     frb = new FluentRecordBase();
     // populates domain constants
     cache = new LookupCache(frb.ToFactory()); //Func<> to DB Factory
 }
Example #7
0
        public void SeActivity_test_search()
        {
            // Arrange
            FluentRecordBase SeDB = new FluentRecordBase();
            int count = SeDB.ToServActivity().GetAll().Count();
            if (count < 20)
            {
                Activity _activity = (Activity)Records.activity.Clone();
                SeDB.ToServActivity().Create(_activity, "ME");
            }

            // Act
            ui.WaitThenClickElement(By.Id("menulinkactivity"));

            // Test bad search first
            ui.WaitForElement(By.Id("activityTable_searchbox")).SendKeys("bk45kjdsgjk4j3lkt6j3lkjgre");
            bool result =ui.WaitForElementValue(By.XPath("//table[@id='activityTable']/tbody/tr/td[1]"), "No matching records found");
            Assert.IsTrue(result, "Activity search results should be empty");

            // Test good search first
            ui.WaitForElement(By.Id("activityTable_searchbox")).Clear();
            ui.WaitForElement(By.Id("activityTable_searchbox")).SendKeys("jadmin");
            result = ui.WaitForElementValue(By.XPath("//table[@id='activityTable']/tbody/tr[5]/td[3]"), "jadmin");
            Assert.IsTrue(result, "Activities search not returning proper results");
        }
Example #8
0
        public void SeActivity_test_pagination()
        {
            // Arrange
            FluentRecordBase SeDB = new FluentRecordBase();
            int count = SeDB.ToServActivity().GetAll().Count();
            if (count < 20)
            {
                Person _person = (Person)Records.person.Clone();
                SeDB.ToServPerson().Create(_person, "ME");
            }

            // Act
            ui.WaitThenClickElement(By.Id("menulinkactivity"));
            var recordID = ui.WaitForElement(By.XPath("//table[@id='activityTable']/tbody/tr")).GetAttribute("recordid");
            ui.WaitThenClickElement(By.CssSelector("#activityTable_next.paginate_enabled_next"));
            Thread.Sleep(1000); // Prevent race condition
            var recordIDPage = ui.WaitForElement(By.XPath("//table[@id='activityTable']/tbody/tr")).GetAttribute("recordid");

            // Assert
            Assert.AreNotEqual(recordID, recordIDPage, "Pagination for Activities List appears to not be working");
        }
 public void TestCleanup()
 {
     //frb.DB.Database.Delete();
     frb = null;
 }
 public void TestInitialize()
 {
     frb = new FluentRecordBase();
     //frb.Initialize(new MacheteInitializer(), "macheteConnection");
     _dOptions = new viewOptions
     {
         CI = new CultureInfo("en-US", false),
         sSearch = "",
         date = DateTime.Today,
         dwccardnum = null,
         woid = null,
         orderDescending = true,
         sortColName = "WOID",
         displayStart = 0,
         displayLength = 20
     };
 }
Example #11
0
 public void Initialize()
 {
     frb = new FluentRecordBase();
     frb.AddDBFactory(connStringName: "MacheteConnection");
 }
 public void FluentRecordBase_AddRepoWorkAssignment()
 {
     var frb = new FluentRecordBase();
     var result = frb.ToWorkAssignment();
     Assert.IsInstanceOfType(result, typeof(WorkAssignment));
 }
 public void FluentRecordBase_AddRepoPerson()
 {
     var frb = new FluentRecordBase();
     var result = frb.ToPerson();
     Assert.IsInstanceOfType(result, typeof(Person));
 }
 public void FluentRecordBase_AddRepoLookup()
 {
     var frb = new FluentRecordBase();
     var result = frb.ToLookup();
     Assert.IsInstanceOfType(result, typeof(Lookup));
 }
 public void FluentRecordBase_AddRepoEmployer()
 {
     var frb = new FluentRecordBase();
     var result = frb.ToEmployer();
     Assert.IsInstanceOfType(result, typeof(Employer));
 }
 public void FluentRecordBase_AddRepoActivitySignin()
 {
     var frb = new FluentRecordBase();
     var result = frb.ToActivitySignin();
     Assert.IsInstanceOfType(result, typeof(ActivitySignin));
 }