// This test case workd from VS but fails from build.cmd for some reason
 //[InlineData("Git/c%3A%5Ca%5C%5Cb%5Cc%20D//Git-upload-pack?ignored&ignored", @"c:\a\\b\c D", GitServerRequestType.UploadPack)]
 public void CustomGitRepositoryHandlerParseValidRequestUri(
     string requestPath,
     string expectedLocaRellPath,
     GitServerRequestType expectedRequestType)
 {
     var handler = CreateHandler();
     string localRelPath = "";
     var uri = new Uri("http://igored/" + requestPath, UriKind.Absolute);
     GitServerRequestType requestType = GitServerRequestType.Unknown;
     var ret = CustomGitRepositoryHandler.TryParseUri(uri, out localRelPath, out requestType);
     Assert.True(ret);
     Assert.Equal(expectedRequestType, requestType);
     Assert.Equal(expectedLocaRellPath, localRelPath);
 }
Esempio n. 2
0
        // This test case workd from VS but fails from build.cmd for some reason
        //[InlineData("Git/c%3A%5Ca%5C%5Cb%5Cc%20D//Git-upload-pack?ignored&ignored", @"c:\a\\b\c D", GitServerRequestType.UploadPack)]
        public void CustomGitRepositoryHandlerParseValidRequestUri(
            string requestPath,
            string expectedLocaRellPath,
            GitServerRequestType expectedRequestType)
        {
            var    handler      = CreateHandler();
            string localRelPath = "";
            var    uri          = new Uri("http://igored/" + requestPath, UriKind.Absolute);
            GitServerRequestType requestType = GitServerRequestType.Unknown;
            var ret = CustomGitRepositoryHandler.TryParseUri(uri, out localRelPath, out requestType);

            Assert.True(ret);
            Assert.Equal(expectedRequestType, requestType);
            Assert.Equal(expectedLocaRellPath, localRelPath);
        }