コード例 #1
0
 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);
 }
コード例 #2
0
 public void ShouldNotRunIfVariableNotSet()
 {
     var convention = new ConfigurationVariablesConvention(fileSystem, replacer);
     convention.Install(deployment);
     replacer.DidNotReceiveWithAnyArgs().ModifyConfigurationFile(null, null);
 }