示例#1
0
        public void ExecuteExtractsCorrectXmlEscapedReleaseNotes(ReleaseNoteExtractor sut)
        {
            var assemblyInfoContent = @"/*expected Func<string> expected */";
            var escapedExpected     = "expected Func&lt;string&gt; expected";
            var expected            = "expected Func<string> expected";

            try
            {
                File.WriteAllText(sut.AssemblyInfo, assemblyInfoContent);

                var actual = sut.Execute();

                Assert.True(actual);
                Assert.Equal(escapedExpected, sut.XmlEscapedReleaseNotes);
                Assert.Equal(expected, sut.ReleaseNotes);
            }
            finally
            {
                if (File.Exists(sut.AssemblyInfo))
                {
                    File.Delete(sut.AssemblyInfo);
                }
            }
        }
 public void XmlEscapedReleaseNotesIsReadWritable(ReleaseNoteExtractor sut, string xmlEscapedReleaseNotes)
 {
     sut.XmlEscapedReleaseNotes = xmlEscapedReleaseNotes;
     Assert.Equal(xmlEscapedReleaseNotes, sut.XmlEscapedReleaseNotes);
 }
 public void ReleaseNotesIsReadWritable(ReleaseNoteExtractor sut, string releaseNotes)
 {
     sut.ReleaseNotes = releaseNotes;
     Assert.Equal(releaseNotes, sut.ReleaseNotes);
 }
 public void AssemblyInfoIsReadWritable(ReleaseNoteExtractor sut, string assemblyInfo)
 {
     sut.AssemblyInfo = assemblyInfo;
     Assert.Equal(assemblyInfo, sut.AssemblyInfo);
 }
        public void ExecuteExtractsCorrectXmlEscapedReleaseNotes(ReleaseNoteExtractor sut)
        {
            var assemblyInfoContent = @"/*expected Func<string> expected */";
            var escapedExpected = "expected Func&lt;string&gt; expected";
            var expected = "expected Func<string> expected";
            try
            {
                File.WriteAllText(sut.AssemblyInfo, assemblyInfoContent);

                var actual = sut.Execute();

                Assert.True(actual);
                Assert.Equal(escapedExpected, sut.XmlEscapedReleaseNotes);
                Assert.Equal(expected, sut.ReleaseNotes);
            }
            finally
            {
                if (File.Exists(sut.AssemblyInfo))
                    File.Delete(sut.AssemblyInfo);
            }
        }
 public void SutIsTask(ReleaseNoteExtractor sut)
 {
     Assert.IsAssignableFrom<Task>(sut);
 }
示例#7
0
 public void XmlEscapedReleaseNotesIsReadWritable(ReleaseNoteExtractor sut, string xmlEscapedReleaseNotes)
 {
     sut.XmlEscapedReleaseNotes = xmlEscapedReleaseNotes;
     Assert.Equal(xmlEscapedReleaseNotes, sut.XmlEscapedReleaseNotes);
 }
示例#8
0
 public void ReleaseNotesIsReadWritable(ReleaseNoteExtractor sut, string releaseNotes)
 {
     sut.ReleaseNotes = releaseNotes;
     Assert.Equal(releaseNotes, sut.ReleaseNotes);
 }
示例#9
0
 public void AssemblyInfoIsReadWritable(ReleaseNoteExtractor sut, string assemblyInfo)
 {
     sut.AssemblyInfo = assemblyInfo;
     Assert.Equal(assemblyInfo, sut.AssemblyInfo);
 }
示例#10
0
 public void SutIsTask(ReleaseNoteExtractor sut)
 {
     Assert.IsAssignableFrom <Task>(sut);
 }