コード例 #1
0
        public void GetRevisionInfoTestCaseMissingAssemblyVersionInfo()
        {
            AssemblyInfoReader assemblyInfoReader = new AssemblyInfoReader(Path.Combine(_projectDirectory, "AssemblyInfoTestCase4.cs"));
            var revisionInfo = assemblyInfoReader.GetRevisionInfo();

            //This needs to fail as file doesn't have AssemblyInfo line
            Assert.AreEqual(false, revisionInfo.Succeed);
        }
コード例 #2
0
        public void GetRevisionInfoTestCaseWithAsterisks()
        {
            AssemblyInfoReader assemblyInfoReader = new AssemblyInfoReader(Path.Combine(_projectDirectory, "AssemblyInfoTestCase2.cs"));
            var revisionInfo = assemblyInfoReader.GetRevisionInfo();

            //In this case it should not succeed
            Assert.AreEqual(true, !revisionInfo.Succeed);
        }
コード例 #3
0
        public void GetRevisionInfoTestCaseStraightForward()
        {
            AssemblyInfoReader assemblyInfoReader = new AssemblyInfoReader(Path.Combine(_projectDirectory, "AssemblyInfoTestCase1.cs"));
            var revisionInfo = assemblyInfoReader.GetRevisionInfo();

            //In this case it should not fail
            Assert.AreEqual(true, revisionInfo.Succeed);
        }
コード例 #4
0
        public void GetRevisionInfoTestCaseWithComments()
        {
            AssemblyInfoReader assemblyInfoReader = new AssemblyInfoReader(Path.Combine(_projectDirectory, "AssemblyInfoTestCase3.cs"));
            var revisionInfo = assemblyInfoReader.GetRevisionInfo();

            //In this case it should succeed
            Assert.AreEqual(true, revisionInfo.Succeed);
            Assert.AreEqual(16, revisionInfo.NextRevisionNumber);
        }
コード例 #5
0
 public void GetRevisionInfoTestCaseMissingFile()
 {
     AssemblyInfoReader assemblyInfoReader = new AssemblyInfoReader(Path.Combine(_projectDirectory, "AssemblyInfoTestCase6.cs"));
     //This needs to throw FileNotFoundException
     var revisionInfo = assemblyInfoReader.GetRevisionInfo();
 }