public void create_a_context_from_warmup_without_failure() { using (var system = new SerenitySystem()) { system.As <ISystem>().Warmup(); system.As <ISystem>().CreateContext().ShouldBeOfType <SerenitySystem.SerenityContext>(); } }
public void security_settings_are_reset_on_each_test_run() { using (var system = new SerenitySystem()) { system.As <ISystem>().CreateContext(); system.Runtime.Get <SecuritySettings>().AuthenticationEnabled = false; // okay, now create a new context and the settings should go back to everything // being enabled system.As <ISystem>().CreateContext(); system.Runtime.Get <SecuritySettings>().AuthenticationEnabled.ShouldBeTrue(); } }
public void the_build_runtime_will_be_in_testing_mode() { using (var system = new SerenitySystem()) { system.As <ISystem>().Warmup().Wait(); system.Runtime.Mode.InTesting().ShouldBeTrue(); } }
public void warmup_will_create_a_fuburuntime() { using (var system = new SerenitySystem()) { system.As <ISystem>().Warmup().Wait(); system.Runtime.ShouldNotBeNull(); } }
public void build_with_system_for_profile() { Project.CurrentProject = new Project { Profile = "phantom/katana" }; using (var system = new SerenitySystem { DefaultBrowser = BrowserType.Firefox }) { system.As<ISystem>().Warmup().Wait(); system.Runtime.Get<IBrowserLifecycle>() .ShouldBeOfType<PhantomBrowser>(); } }
public void build_for_a_system_with_default() { Project.CurrentProject = new Project { Profile = null }; using (var system = new SerenitySystem{DefaultBrowser = BrowserType.Firefox}) { system.As<ISystem>().Warmup().Wait(); system.Runtime.Get<IBrowserLifecycle>() .ShouldBeOfType<FirefoxBrowser>(); } }
public void build_for_a_system_all_defaults() { Project.CurrentProject = new Project { Profile = null }; using (var system = new SerenitySystem()) { system.As<ISystem>().Warmup().Wait(); system.Runtime.Get<IBrowserLifecycle>() .ShouldBeOfType<ChromeBrowser>(); } }
public void build_for_a_system_all_defaults() { Project.CurrentProject = new Project { Profile = null }; using (var system = new SerenitySystem()) { system.As <ISystem>().Warmup().Wait(); system.Runtime.Get <IBrowserLifecycle>() .ShouldBeOfType <ChromeBrowser>(); } }
public void build_with_system_for_profile() { Project.CurrentProject = new Project { Profile = "phantom/katana" }; using (var system = new SerenitySystem { DefaultBrowser = BrowserType.Firefox }) { system.As <ISystem>().Warmup().Wait(); system.Runtime.Get <IBrowserLifecycle>() .ShouldBeOfType <PhantomBrowser>(); } }
public void build_for_a_system_with_default() { Project.CurrentProject = new Project { Profile = null }; using (var system = new SerenitySystem { DefaultBrowser = BrowserType.Firefox }) { system.As <ISystem>().Warmup().Wait(); system.Runtime.Get <IBrowserLifecycle>() .ShouldBeOfType <FirefoxBrowser>(); } }
public void warmup_will_create_a_fuburuntime() { using (var system = new SerenitySystem()) { system.As<ISystem>().Warmup().Wait(); system.Runtime.ShouldNotBeNull(); } }
public void the_build_runtime_will_be_in_testing_mode() { using (var system = new SerenitySystem()) { system.As<ISystem>().Warmup().Wait(); system.Runtime.Mode.InTesting().ShouldBeTrue(); } }
public void security_settings_are_reset_on_each_test_run() { using (var system = new SerenitySystem()) { system.As<ISystem>().CreateContext(); system.Runtime.Get<SecuritySettings>().AuthenticationEnabled = false; // okay, now create a new context and the settings should go back to everything // being enabled system.As<ISystem>().CreateContext(); system.Runtime.Get<SecuritySettings>().AuthenticationEnabled.ShouldBeTrue(); } }
public void create_a_context_without_warmup_without_failure() { using (var system = new SerenitySystem()) { system.As<ISystem>().CreateContext().ShouldBeOfType<SerenitySystem.SerenityContext>(); } }