public void CreateHostDelegatesToCreateHostImplWithACanonicalizedHostSetup()
        {
            StubHostFactory factory = new StubHostFactory();

            HostSetup originalHostSetup = new HostSetup();
            originalHostSetup.WorkingDirectory = "";
            ILogger logger = new MarkupStreamLogger(TestLog.Default);
            Assert.IsNotNull(factory.CreateHost(originalHostSetup, logger));

            Assert.AreNotSame(originalHostSetup, factory.HostSetup);
            Assert.AreEqual(Environment.CurrentDirectory, factory.HostSetup.WorkingDirectory);
            Assert.AreSame(logger, factory.Logger);
        }
        public void CreateHostDelegatesToCreateHostImplWithACanonicalizedHostSetup()
        {
            StubHostFactory factory = new StubHostFactory();

            HostSetup originalHostSetup = new HostSetup();

            originalHostSetup.WorkingDirectory = "";
            ILogger logger = new MarkupStreamLogger(TestLog.Default);

            Assert.IsNotNull(factory.CreateHost(originalHostSetup, logger));

            Assert.AreNotSame(originalHostSetup, factory.HostSetup);
            Assert.AreEqual(Environment.CurrentDirectory, factory.HostSetup.WorkingDirectory);
            Assert.AreSame(logger, factory.Logger);
        }
 public void CreateHostThrowsIfLoggerIsNull()
 {
     StubHostFactory factory = new StubHostFactory();
     factory.CreateHost(new HostSetup(), null);
 }
 public void CreateHostThrowsIfHostSetupIsNull()
 {
     StubHostFactory factory = new StubHostFactory();
     factory.CreateHost(null, new MarkupStreamLogger(TestLog.Default));
 }
        public void CreateHostThrowsIfLoggerIsNull()
        {
            StubHostFactory factory = new StubHostFactory();

            factory.CreateHost(new HostSetup(), null);
        }
        public void CreateHostThrowsIfHostSetupIsNull()
        {
            StubHostFactory factory = new StubHostFactory();

            factory.CreateHost(null, new MarkupStreamLogger(TestLog.Default));
        }