Exemplo n.º 1
0
        public Startup()
        {
            Container = new UnityContainer();

            _loggingSubsystem   = new LoggingSubsystem(Container);
            _servicesSubsystem  = new ServicesSubsystem(Container);
            _validatorSubsystem = new ValidatorSubsystem(Container);
            _executorsSubsystem = new ExecutorsSubsystem(Container);

            _isFirstRun = true;
        }
        public void Given_ServicesSubsystem_When_Initializing_Then_Dependencies_Are_Registered()
        {
            using (var startup = new Startup())
            {
                startup.Start();

                var container = Startup.Container;

                var executorsSubsystem = new ServicesSubsystem(container);
                executorsSubsystem.Start();

                var mazeSource = container.Resolve <IMazeSource>();

                Assert.IsNotNull(mazeSource);
            }
        }