public void ShouldNotRunIfVariableNotSet() { var convention = new ConfigurationVariablesConvention(fileSystem, replacer); convention.Install(deployment); replacer.DidNotReceiveWithAnyArgs().ModifyConfigurationFile(null, null); }
public void ShouldNotRunIfFeatureNotEnabled() { var convention = new ConfigurationVariablesConvention(new ConfigurationVariablesBehaviour(fileSystem, deployment.Variables, replacer, new InMemoryLog())); convention.Install(deployment); replacer.DidNotReceiveWithAnyArgs().ModifyConfigurationFile(null, null); }
public void ShouldNotRunIfConfiguredToNotReplace() { deployment.Variables.Set(KnownVariables.Package.EnabledFeatures, KnownVariables.Features.ConfigurationVariables); deployment.Variables.Set(KnownVariables.Package.AutomaticallyUpdateAppSettingsAndConnectionStrings, "false"); var convention = new ConfigurationVariablesConvention(new ConfigurationVariablesBehaviour(fileSystem, deployment.Variables, replacer, new InMemoryLog())); convention.Install(deployment); replacer.DidNotReceiveWithAnyArgs().ModifyConfigurationFile(null, null); }
public void ShouldFindAndCallDeployScripts() { deployment.Variables.Set(SpecialVariables.Package.AutomaticallyUpdateAppSettingsAndConnectionStrings, "true"); var convention = new ConfigurationVariablesConvention(fileSystem, replacer); convention.Install(deployment); replacer.Received().ModifyConfigurationFile("C:\\App\\MyApp\\Web.config", deployment.Variables); replacer.Received().ModifyConfigurationFile("C:\\App\\MyApp\\Web.Release.config", deployment.Variables); replacer.Received().ModifyConfigurationFile("C:\\App\\MyApp\\Views\\Web.config", deployment.Variables); }
public void ShouldFindAndCallDeployScripts() { deployment.Variables.Set(KnownVariables.Package.EnabledFeatures, KnownVariables.Features.ConfigurationVariables); var convention = new ConfigurationVariablesConvention(new ConfigurationVariablesBehaviour(fileSystem, replacer, new InMemoryLog())); convention.Install(deployment); replacer.Received().ModifyConfigurationFile("C:\\App\\MyApp\\Web.config", deployment.Variables); replacer.Received().ModifyConfigurationFile("C:\\App\\MyApp\\Web.Release.config", deployment.Variables); replacer.Received().ModifyConfigurationFile("C:\\App\\MyApp\\Views\\Web.config", deployment.Variables); }