Example #1
0
            public void WithDependencies()
            {
                Host host = new Host(_initializationStrategyFactory);
                var config = new FakeConfig(host);
                var dependency1 = new FakeDependency("Some Service");
                var dependency2 = new FakeDependency("Some Other Service");

                config.Dependencies = new List<Dependency>
                                          {
                                              dependency1,
                                              dependency2,
                                          };

                CreatesInitializationStrategy();
                InitializesTheHost(config);

                host.Run(config);

                Assert.IsTrue(dependency1.Started);
                Assert.IsTrue(dependency2.Started);
            }
Example #2
0
            public void WithDependencies()
            {
                Host host        = new Host(_initializationStrategyFactory);
                var  config      = new FakeConfig(host);
                var  dependency1 = new FakeDependency("Some Service");
                var  dependency2 = new FakeDependency("Some Other Service");

                config.Dependencies = new List <Dependency>
                {
                    dependency1,
                    dependency2,
                };

                CreatesInitializationStrategy();
                InitializesTheHost(config);

                host.Run(config);

                Assert.IsTrue(dependency1.Started);
                Assert.IsTrue(dependency2.Started);
            }