Example #1
0
        public void Can_extract_unit_test_from_valid_SheetName()
        {
            // arrange
            var xls = new ExcelSource(Path.Combine(PathHelper.Artifacts("TEST_TEMPLATE.xlsx")));

            // act
            TestCase ut = xls.Get("TestCase-1");

            // assert
            Assert.NotNull(ut);
            Assert.True(ut.Steps > 0);
        }
Example #2
0
        public void Can_verify_test_result()
        {
            // arrange
            CommandFactory.Register();

            var xls = new ExcelSource(Path.Combine(PathHelper.Artifacts("TEST_TEMPLATE.xlsx")));
            TestCase ut = xls.Get("TestCase-2");

            // act
            using (var driver = new ChromeDriver())
            {
                ut.Run(driver);
            }

            Assert.Equal(TestResult.Passed, ut.Result);
        }
Example #3
0
        public void Can_take_snapshot()
        {
            // arrange
            CommandFactory.Register();

            var xls = new ExcelSource(Path.Combine(PathHelper.Artifacts("TEST_TEMPLATE.xlsx")));
            TestCase ut = xls.Get("TestCase-Capture");

            // act
            using (var driver = new ChromeDriver())
            {
                ut.Run(driver);
            }

            var directory = Directory.GetCurrentDirectory();

            Assert.True(File.Exists(Path.Combine(directory, "login-page.png")));
        }