Exemplo n.º 1
0
        public void TestInitialize()
        {
            this.TestContext.Properties.Add("Configuration", new FakeClientConfiguration());

            FakeConfigurationProvider configurationProvider = new FakeConfigurationProvider();

            configurationProvider.PredefineResult(this.Configuration, p => p.GetClientConfiguration());

            this.TestContext.Properties.Add("TaskProcessorProxy", new TaskProcessorFacade(new FakeTaskProcessorRepository(), new FakeMessageBus(), new FakeDateTimeProvider(), configurationProvider));
        }
        public void TestInitialize()
        {
            this.TestContext.Properties.Add("Repository", new FakeTaskProcessorRepository());
            this.TestContext.Properties.Add("MessageBus", new FakeMessageBus());
            this.TestContext.Properties.Add("DateTimeProvider", new FakeDateTimeProvider());
            this.TestContext.Properties.Add("TaskWorkerFactory", new FakeTaskWorkerFactory());
            this.TestContext.Properties.Add("Configuration", new FakeTaskWorkersConfiguration());

            FakeConfigurationProvider configProvider = new FakeConfigurationProvider();

            configProvider.PredefineResult(this.Configuration, p => p.GetTaskWorkerConfiguration());

            this.Configuration.Add <FakeTask>(new FakeTaskWorkerConfiguration());

            this.TestContext.Properties.Add("TaskWorker", new TaskWorkerBootstrap(configProvider, this.Repository, this.MessageBus, this.TaskWorkerFactory, this.DateTimeProvider));
        }