Example #1
0
        public void Parse_ThrowsForInvalidManifests(string invalidManifest)
        {
            // Arrange
            var assembly = new TestAssembly(invalidManifest);

            // Act & Assert
            Assert.Throws <InvalidOperationException>(() => ManifestParser.Parse(assembly));
        }
Example #2
0
        public void Parse_IgnoresAdditionalDataOnFileAndDirectoryNodes(string manifest)
        {
            // Arrange
            var assembly = new TestAssembly(manifest);

            // Act
            var result = ManifestParser.Parse(assembly);

            // Assert
            Assert.NotNull(result);
        }
Example #3
0
        public void Parse_ThrowsForEntriesWithDifferentCasing()
        {
            // Arrange
            var assembly = new TestAssembly(
                TestEntry.Directory("unused",
                                    TestEntry.File("sample.txt"),
                                    TestEntry.File("SAMPLE.TXT")));

            // Act & Assert
            Assert.Throws <InvalidOperationException>(() => ManifestParser.Parse(assembly));
        }
Example #4
0
        public void Parse_UsesDefaultManifestNameForManifest()
        {
            // Arrange
            var assembly = new TestAssembly(
                TestEntry.Directory("unused",
                                    TestEntry.File("sample.txt")));

            // Act
            var manifest = ManifestParser.Parse(assembly);

            // Assert
            Assert.NotNull(manifest);
        }
Example #5
0
        public void Parse_FindsManifestWithCustomName()
        {
            // Arrange
            var assembly = new TestAssembly(
                TestEntry.Directory("unused",
                                    TestEntry.File("sample.txt")),
                manifestName: "Manifest.xml");

            // Act
            var manifest = ManifestParser.Parse(assembly, "Manifest.xml");

            // Assert
            Assert.NotNull(manifest);
        }