コード例 #1
0
            public void Should_encode_white_spaces()
            {
                string source   = "Cwi.Core-2.10-dev.zip!/My Path/Cwi.Core.dll";
                var    expected = new File
                {
                    ContentHref = source,
                    Name        = "Cwi.Core.dll"
                };

                File file = ArtifactRule.ParseSource(source);

                Assert.Equal("Cwi.Core-2.10-dev.zip!/My%20Path/Cwi.Core.dll", file.ContentHref);
            }
コード例 #2
0
            public void Root_file()
            {
                string source = "Cwi.Core.dll";

                var expected = new File
                {
                    ContentHref = source,
                    Name        = "Cwi.Core.dll"
                };

                File file = ArtifactRule.ParseSource(source);

                Assert.Equal(expected.ContentHref, file.ContentHref);
                Assert.Equal(expected.Name, file.Name);
            }
コード例 #3
0
            public void Extract_full_zip()
            {
                string source = "MyFile.zip!**";

                var expected = new File
                {
                    ContentHref = "MyFile.zip",
                    Name        = "MyFile.zip!**"
                };

                File file = ArtifactRule.ParseSource(source);

                Assert.Equal(expected.ContentHref, file.ContentHref);
                Assert.Equal(expected.Name, file.Name);
            }
コード例 #4
0
            public void Directory()
            {
                string source = "/bin/release";

                var expected = new File
                {
                    ChildrenHref = source,
                    Name         = "release"
                };

                File file = ArtifactRule.ParseSource(source);

                Assert.Null(file.ContentHref);
                Assert.Equal(expected.ChildrenHref, file.ChildrenHref);
                Assert.Equal(expected.Name, file.Name);
            }
コード例 #5
0
            public void File_within_zip()
            {
                string source = "Cwi.Core-2.10-dev.zip!/Cwi.Core.dll";
                //string source = "en-us/BIFInstall_*.msi";
                //string source = "BIFLoader-2.9.7-dev.zip!**";
                var expected = new File
                {
                    ContentHref = source,
                    Name        = "Cwi.Core.dll"
                };

                File file = ArtifactRule.ParseSource(source);

                Assert.Equal(expected.ContentHref, file.ContentHref);
                Assert.Equal(expected.Name, file.Name);
            }