コード例 #1
0
        public void calling_ProcessTargetsBuildTargetsTemplate_should_save_the_template_on_disk()
        {
            var cont = new ApplicationController(new[] { "-p", "My App", "-o", "." });

            var config = cont.ProcessTargetsBuildTargetsTemplate();

            config.Should().NotBeNull();
            File.Exists(config.Persistence.OutputTemplatePath).Should().BeTrue();
            config.Persistence.OutputTemplatePath.Should().Be(@".\Targets\Build\My App.BuildTargets.import");

            //testing that the template tokens were substituted correctly
            var templateRes = this.GetContentFromPersistedTemplate(config);
        }