Exemple #1
0
        public void OverrideTestCaseNameWithConstructor()
        {
            TestBuilder builder = new TestBuilder("Testing");

            builder
            .AddLogger <ExampleLogger>()
            .RemoveLogger()
            .AddTestBlock <ExampleTestBlockWithExecuteArg>("Testing")
            .ExecuteTestCase();
        }
Exemple #2
0
        public void AddLoggerReturnsCorrectLogger()
        {
            TestBuilder builder = new TestBuilder();

            builder
            .AddLogger <ExampleLogger>()
            .AddTestBlock <ExampleLoggerUsage>();

            Assert.Throws <NotImplementedException>(() => builder.ExecuteTestCase());
        }
Exemple #3
0
        public void AddingLoggerThanRemovingDoesNotThrow()
        {
            TestBuilder builder = new TestBuilder();

            builder
            .AddLogger <ExampleLogger>()
            .RemoveLogger()
            .AddTestBlock <ExampleTestBlockWithExecuteArg>("Testing")
            .ExecuteTestCase();
        }
Exemple #4
0
        public void Test1()
        {
            var expectedResult = new SiteStatus
            {
                IsHeaderAvailable = true,
                IsBodyAvailable   = true
            };

            TestBuilder builder = new TestBuilder();

            builder
            .AddLogger <NewLogger>()
            .AddDependencyService <IWebDriver>(new WebDriverFactory("Chrome").Driver)
            .AddDependencyService <Harness.IntelliTectWebpage>()
            .AddTestBlock <TestBlocks.NavigateToWebsite>()
            .AddTestBlock <TestBlocks.VerifyWebsiteBodyIsDisplayed>(expectedResult)
            .ExecuteTestCase();
        }