public void WhenSubtituteSettingsCalled_EscapedSubstitutionsRemain()
        {
            CleanOutput();

            var hash = new Hashtable { { "Key A", new[] { "Value A" } }, { "Key B", new []{"Value B" }}, { "verbatim", new[] { "not used" } } };

            var cmd = new CopySubstitutedSettingFiles()
            {
                DeploymentEnvironment = "Test",
                TemplatesDirectory = @"Integration\_templates",
                TargetDirectory = @"Integration\_environments",
                Settings = hash
            };

            var result = cmd.Invoke().GetEnumerator();

            result.MoveNext();

            var text1 = File.ReadAllText(file3);
            Assert.That(text1, Is.EqualTo(@"some sttuffff Value A ${verbatim} then some"));
        }
        public void WhenSubtituteSettingsCalled_SubstitutionsMaintainEncoding()
        {
            CleanOutput();

            var hash = new Hashtable { { "Key A", new[] { "Value A" } },  { "Key B", new[] {"Value B" }} };

            var cmd = new CopySubstitutedSettingFiles()
            {
                DeploymentEnvironment = "Test",
                TemplatesDirectory = @"Integration\_templates",
                TargetDirectory = @"Integration\_environments",
                Settings = hash
            };

            var result = cmd.Invoke().GetEnumerator();

            result.MoveNext();

            var encoding = EncodingTools.DetectInputCodepage(File.ReadAllBytes(file2));

            Assert.That(encoding, Is.EqualTo(Encoding.Unicode));
        }