コード例 #1
0
        public void Should_Rename_And_Move_The_Generated()
        {
            CreateGeneratedFiles();
            var coverletDataCollectorGeneratedCobertura = new CoverletDataCollectorGeneratedCobertura();
            var coverageOutputFile = Path.Combine(coverageOutputFolder.FullName, "renamed.xml");

            coverletDataCollectorGeneratedCobertura.CorrectPath(coverageOutputFolder.FullName, coverageOutputFile);
            Assert.AreEqual("last", File.ReadAllText(coverageOutputFile));
        }
コード例 #2
0
        public void Should_Throw_If_Did_Not_Generate()
        {
            var coverletDataCollectorGeneratedCobertura = new CoverletDataCollectorGeneratedCobertura();
            var coverageOutputFile = Path.Combine(coverageOutputFolder.FullName, "renamed.xml");

            Assert.Throws <Exception>(() =>
            {
                coverletDataCollectorGeneratedCobertura.CorrectPath(coverageOutputFolder.FullName, coverageOutputFile);
            }, "Data collector did not generate coverage.cobertura.xml");
        }
コード例 #3
0
        public void Should_Delete_The_Generated_Directory()
        {
            var generatedDirectory = GetLastDirectoryPath();

            CreateGeneratedFiles();
            Assert.True(Directory.Exists(generatedDirectory));
            var coverletDataCollectorGeneratedCobertura = new CoverletDataCollectorGeneratedCobertura();
            var coverageOutputFile = Path.Combine(coverageOutputFolder.FullName, "renamed.xml");

            coverletDataCollectorGeneratedCobertura.CorrectPath(coverageOutputFolder.FullName, coverageOutputFile);
            Assert.False(Directory.Exists(generatedDirectory));
        }