AppDiTests.AppDriverFactoryTests.AppDriverFactoryConfiguration.Creates_AppDriver_specifying_baseURL_fisrt_and_then_Browser C# (CSharp) 메소드

Creates_AppDriver_specifying_baseURL_fisrt_and_then_Browser() 개인적인 메소드

        public void Creates_AppDriver_specifying_baseURL_fisrt_and_then_Browser()
        {
            //set base url first, browser second
            AppDriver result = SUT.Driving(DESIRED_URL).Using<PhantomJSDriver>().Create();

            Assert.NotNull(result.WebDriver);
            Assert.Equal(DESIRED_URL, result.BaseUrl.ToString());
            //Initially, I had the assertion below. But this is redundant.
            //My code is not in charge of selecting the correct IWebDriver, I use generics for that
            //I should let the .net take care of testing that part
            //Great example of thinking through your assertions
            //Assert.IsType<Lazy<PhantomJSDriver>>(result.WebDriver);
            //It also resulted in some nasty cleanup code:
            //result.WebDriver.Value.Quit();
        }