public void Start() { // Arrange var task = new Mock <IStartupTask>(MockBehavior.Strict); m_resolverMock.Setup(resolver => resolver.ResolveAll <IStartupTask>()).Returns(new IStartupTask[] { task.Object }); task.Setup(t => t.Execute()); // Act BootstrapLoader.Start(); // Assert }
public static void Main() { UnityBootstrapLoader.Initialize(UnityBootstrapLoader.LoadConfigFilesFromAppSettings()); BootstrapLoader.Start(); var queue = DependencyResolver.Resolve <HistoryLogQueue>("Default-HistoryLog"); var timer = new Timer(TimeSpan.FromSeconds(1.5).TotalMilliseconds); timer.Elapsed += (s, e) => { queue.Enqueue(DomainModelFactory.RandomHistoryLogItem()); }; timer.Start(); Console.WriteLine("Press Enter to exit."); Console.ReadLine(); timer.Stop(); BootstrapLoader.End(); Assert.True(queue.IsEmpty()); }
public virtual void OnStart() { BootstrapLoader.Start(); }
protected void Application_Start() { UnityBootstrapLoader.Initialize(UnityBootstrapLoader.LoadConfigFilesFromAppSettings()); BootstrapLoader.Start(); }