public void assert_is_valid_with_application_base_and_assembly_name_set_should_not_throw() { var run = new EnvironmentRun() { ApplicationBase = ".", AssemblyName = "SomeAssembly" }; run.AssertIsValid(); }
public void assert_is_valid_with_application_base_and_environment_class_name_but_not_assembly() { var run = new EnvironmentRun() { ApplicationBase = ".", EnvironmentClassName = "some class" }; run.AssertIsValid(); }
public void assert_is_valid_missing_both_environment_class_name_and_assembly_name_throws() { var run = new EnvironmentRun(){ ApplicationBase = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "folder1") }; Exception<EnvironmentRunnerException>.ShouldBeThrownBy(() => { run.AssertIsValid(); }).Message.ShouldContain("Either EnvironmentClassName or AssemblyName must be set"); }
public void assert_is_valid_missing_application_base_throws() { var run = new EnvironmentRun{ EnvironmentClassName = "some class" }; Exception<EnvironmentRunnerException>.ShouldBeThrownBy(() => { run.AssertIsValid(); }).Message.ShouldContain("ApplicationBase must be a valid folder"); }
public void build_app_domain_setup() { var baseFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "folder1"); var run = new EnvironmentRun(){ ApplicationBase = baseFolder, ConfigurationFile = "web.config" }; var setup = run.BuildAppDomainSetup(); setup.ApplicationBase.ShouldEqual(run.ApplicationBase); setup.ConfigurationFile.ShouldEqual(Path.Combine(baseFolder, "web.config")); setup.ApplicationName.ShouldStartWith("Bottles-Environment-Installation"); setup.ShadowCopyFiles.ShouldEqual("true"); }
public void ForEnvironment([SelectionValues("environments")]string name) { var className = "{0}.{1}, {0}".ToFormat(typeof (EnvironmentThatBlowsUpInStartUp).Assembly.GetName().Name, name); var applicationBase = Path.GetFullPath(@"src/FubuTestApplication/bin"); Debug.WriteLine("Setting the Application Base to " + applicationBase); var run = new EnvironmentRun(){ ApplicationBase = applicationBase, EnvironmentClassName = className }; var domain = new EnvironmentGateway(run); _installLogs = domain.Install(); _environmentLogs = domain.CheckEnvironment(); _allLogs = domain.InstallAndCheckEnvironment(); }
public EnvironmentGateway(EnvironmentRun run) { _run = run; }
private IEnumerable <LogEntry> execute(EnvironmentRun run, params Action <IInstaller, IPackageLog>[] actions) { var runner = new EnvironmentRunner(run); return(runner.ExecuteEnvironment(actions)); }
public IEnumerable <LogEntry> InstallAndCheckEnvironment(EnvironmentRun run) { return(execute(run, (installer, log) => installer.Install(log), (installer, log) => installer.CheckEnvironment(log))); }
public EnvironmentRunner(EnvironmentRun run) { _run = run; }
public IEnumerable<LogEntry> InstallAndCheckEnvironment(EnvironmentRun run) { return execute(run, (i, l) => i.Install(l), (i, l) => i.CheckEnvironment(l)); }
public IEnumerable <LogEntry> InstallAndCheckEnvironment(EnvironmentRun run) { return(execute(run, (i, l) => i.Install(l), (i, l) => i.CheckEnvironment(l))); }
public void find_specific_class_if_environment_class_is_specified() { var run = new EnvironmentRun() { EnvironmentClassName = typeof(FakeEnvironment).AssemblyQualifiedName }; run.FindEnvironmentType(new PackageLog()).ShouldEqual(typeof (FakeEnvironment)); }
public IEnumerable<EnvironmentLogEntry> InstallAndCheckEnvironment(EnvironmentRun run) { return execute(run, (installer, log) => installer.Install(log), (installer, log) => installer.CheckEnvironment(log)); }
private IEnumerable<EnvironmentLogEntry> execute(EnvironmentRun run, params Action<IInstaller, IPackageLog>[] actions) { var runner = new EnvironmentRunner(run); return runner.ExecuteEnvironment(actions); }
public IEnumerable<LogEntry> Install(EnvironmentRun run) { return execute(run, (installer, log) => installer.Install(log)); }