public void listens_and_finishes_after_receiving_the_all_clear() { // trying to get the asset pipeline to shut up about // non-existent assets var settings = new ApplicationSettings { PhysicalPath = Environment.CurrentDirectory .ParentDirectory().ParentDirectory().ParentDirectory() .AppendPath("RemoteService") }; var system = new FubuMvcSystem(() => FubuRuntime.Basic()); system.AddRemoteSubSystem("Remote", x => { x.UseParallelServiceDirectory("RemoteService"); }); using (var context = system.CreateContext()) { system.StartListeningForMessages(); var message = new RemoteGo(); MessageHistory.Record(MessageTrack.ForSent(message)); var waitForWorkToFinish = MessageHistory.WaitForWorkToFinish( () => { system.RemoteSubSystemFor("Remote").Runner.SendRemotely(message); }, 30000); waitForWorkToFinish.ShouldBeTrue(); } }
public void listens_and_finishes_after_receiving_the_all_clear() { // trying to get the asset pipeline to shut up about // non-existent assets var settings = new ApplicationSettings { PhysicalPath = Environment.CurrentDirectory .ParentDirectory().ParentDirectory().ParentDirectory() .AppendPath("RemoteService") }; var system = new FubuMvcSystem(settings, () => FubuApplication.DefaultPolicies().StructureMap().Bootstrap()); system.AddRemoteSubSystem("Remote", x => { x.UseParallelServiceDirectory("RemoteService"); }); using (var context = system.CreateContext()) { system.StartListeningForMessages(); var message = new RemoteGo(); MessageHistory.Record(MessageTrack.ForSent(message)); var waitForWorkToFinish = MessageHistory.WaitForWorkToFinish(() => { system.RemoteSubSystemFor("Remote").Runner.SendRemotely(message); }, timeoutMilliseconds:30000); waitForWorkToFinish.ShouldBeTrue(); } }
public void uses_explicit_physical_path_if_if_exists() { using (var system = new FubuMvcSystem <TargetApplication>(physicalPath: "c:\\foo")) { system.Settings.PhysicalPath.ShouldBe("c:\\foo"); } }
public void use_default_physical_path_if_none_given() { using (var system = new FubuMvcSystem <KayakApplication>()) { // assembly name system.Settings.PhysicalPath.ShouldEndWith("KayakTestApplication"); } }
public void parallel_path() { using (var system = new FubuMvcSystem <KayakApplication>("foo")) { // assembly name system.Settings.PhysicalPath.ShouldEndWith("foo"); } }
public void parallel_path() { using (var system = new FubuMvcSystem<KayakApplication>("foo")) { // assembly name system.Settings.PhysicalPath.ShouldEndWith("foo"); } }
public void register_a_remote_subsystem() { var system = new FubuMvcSystem(() => null); system.AddRemoteSubSystem("foo", x => { }); system.RemoteSubSystemFor("foo").ShouldNotBeNull(); system.SubSystems.OfType <RemoteSubSystem>().Single().ShouldBeOfType <RemoteSubSystem>(); }
public void modify_the_underlying_container() { using (var system = new FubuMvcSystem<TargetApplication>()) { system.ModifyContainer(x => x.For<IColor>().Use<Green>()); system.CreateContext().GetService<IColor>() .ShouldBeOfType<Green>(); } }
public void modify_the_underlying_container() { using (var system = new FubuMvcSystem <TargetApplication>()) { system.ModifyContainer(x => x.For <IColor>().Use <Green>()); system.CreateContext().GetService <IColor>() .ShouldBeOfType <Green>(); } }
public void registers_the_IRemoveSubsystems_with_the_container() { FubuMvcPackageFacility.PhysicalRootPath = ".".ToFullPath(); using (var system = new FubuMvcSystem <TargetApplication>()) { using (var context = system.CreateContext()) { context.Services.GetInstance <IRemoteSubsystems>() .ShouldBeTheSameAs(system); } } }
public void registers_the_IRemoveSubsystems_with_the_container() { //FubuApplication.RootPath = ".".ToFullPath(); using (var system = new FubuMvcSystem <TargetApplication>()) { using (var context = system.CreateContext()) { context.GetService <IRemoteSubsystems>() .ShouldBeTheSameAs(system); } } }
public void registers_the_IRemoveSubsystems_with_the_container() { //FubuApplication.RootPath = ".".ToFullPath(); using (var system = new FubuMvcSystem<TargetApplication>()) { using (var context = system.CreateContext()) { context.GetService<IRemoteSubsystems>() .ShouldBeTheSameAs(system); } } }
public void works_with_the_contextual_providers() { using (var system = new FubuMvcSystem <TargetApplication>()) { system.ModifyContainer(x => { x.For <IContextualInfoProvider>().Add(new FakeContextualProvider("red", "green")); x.For <IContextualInfoProvider>().Add(new FakeContextualProvider("blue", "orange")); }); system.CreateContext().As <IResultsExtension>() .Tags().Select(x => x.Text()) .ShouldHaveTheSameElementsAs("red", "green", "blue", "orange"); } }
public void can_recycle() { using (var system = new FubuMvcSystem<TargetApplication>()) { using (var context = system.CreateContext()) { context.GetService<IApplicationUnderTest>().ShouldNotBeNull(); system.Recycle(); context.GetService<IApplicationUnderTest>().ShouldNotBeNull(); } using (var context = system.CreateContext()) { context.GetService<IApplicationUnderTest>().ShouldNotBeNull(); system.Recycle(); context.GetService<IApplicationUnderTest>().ShouldNotBeNull(); } } }
public void can_recycle() { using (var system = new FubuMvcSystem <TargetApplication>()) { using (var context = system.CreateContext()) { context.GetService <IApplicationUnderTest>().ShouldNotBeNull(); system.Recycle(); context.GetService <IApplicationUnderTest>().ShouldNotBeNull(); } using (var context = system.CreateContext()) { context.GetService <IApplicationUnderTest>().ShouldNotBeNull(); system.Recycle(); context.GetService <IApplicationUnderTest>().ShouldNotBeNull(); } } }
public void register_a_remote_subsystem() { var system = new FubuMvcSystem(() => null); system.AddRemoteSubSystem("foo", x => { }); system.RemoteSubSystemFor("foo").ShouldNotBeNull(); system.SubSystems.OfType<RemoteSubSystem>().Single().ShouldBeOfType<RemoteSubSystem>(); }
public void SetUp() { theSystem = new FubuMvcSystem(() => { return null; }); theSystem.DefaultBrowser = BrowserType.Chrome; }
public void SetUp() { theSystem = new FubuMvcSystem <KayakApplication>(); }
public void SetUp() { theSystem = new FubuMvcSystem<KayakApplication>(); }
public void SetUp() { theSystem = new FubuMvcSystem(new ApplicationSettings(), () => { return(null); }); theSystem.DefaultBrowser = BrowserType.Chrome; }
public void use_default_physical_path_if_none_given() { using (var system = new FubuMvcSystem<KayakApplication>()) { // assembly name system.Settings.PhysicalPath.ShouldEndWith("KayakTestApplication"); } }
public void works_with_the_contextual_providers() { using (var system = new FubuMvcSystem<TargetApplication>()) { system.ModifyContainer(x => { x.For<IContextualInfoProvider>().Add(new FakeContextualProvider("red", "green")); x.For<IContextualInfoProvider>().Add(new FakeContextualProvider("blue", "orange")); }); system.CreateContext().As<IResultsExtension>() .Tags().Select(x => x.Text()) .ShouldHaveTheSameElementsAs("red", "green", "blue", "orange"); } }
public void uses_explicit_physical_path_if_if_exists() { using (var system = new FubuMvcSystem<TargetApplication>(physicalPath: "c:\\foo")) { system.Settings.PhysicalPath.ShouldBe("c:\\foo"); } }
public void registers_the_IRemoveSubsystems_with_the_container() { FubuMvcPackageFacility.PhysicalRootPath = ".".ToFullPath(); using ( var system = new FubuMvcSystem<TargetApplication>() ) { using (var context = system.CreateContext()) { context.Services.GetInstance<IRemoteSubsystems>() .ShouldBeTheSameAs(system); } } }
public void SetUp() { theSystem = new FubuMvcSystem(new ApplicationSettings(), () => { return null; }); theSystem.DefaultBrowser = BrowserType.Chrome; }
public void SetUp() { theSystem = new FubuMvcSystem(() => { return(null); }); theSystem.DefaultBrowser = BrowserType.Chrome; }