Remove git protocol from test data

上级 1e6da83a
......@@ -13,8 +13,6 @@ public class CloneFixture : BaseFixture
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository")]
//[InlineData("git@github.com:libgit2/TestGitRepository")]
public void CanClone(string url)
{
var scd = BuildSelfCleaningDirectory();
......@@ -102,8 +100,6 @@ public void CanCloneALocalRepositoryFromANewlyCreatedTemporaryPath()
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository")]
//[InlineData("git@github.com:libgit2/TestGitRepository")]
public void CanCloneBarely(string url)
{
var scd = BuildSelfCleaningDirectory();
......@@ -126,7 +122,7 @@ public void CanCloneBarely(string url)
}
[Theory]
[InlineData("git://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
public void WontCheckoutIfAskedNotTo(string url)
{
var scd = BuildSelfCleaningDirectory();
......@@ -143,7 +139,7 @@ public void WontCheckoutIfAskedNotTo(string url)
}
[Theory]
[InlineData("git://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
public void CallsProgressCallbacks(string url)
{
bool transferWasCalled = false;
......@@ -301,7 +297,7 @@ public void CanInspectCertificateOnClone(string url, string hostname, Type certT
}
[Theory]
[InlineData("git://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
public void CloningWithoutWorkdirPathThrows(string url)
{
Assert.Throws<ArgumentNullException>(() => Repository.Clone(url, null));
......
......@@ -4,7 +4,6 @@
using System.Linq;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;
namespace LibGit2Sharp.Tests
{
......@@ -15,7 +14,6 @@ public class FetchFixture : BaseFixture
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
public void CanFetchIntoAnEmptyRepository(string url)
{
string path = InitNewRepository();
......@@ -74,7 +72,6 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
public void CanFetchAllTagsIntoAnEmptyRepository(string url)
{
string path = InitNewRepository();
......@@ -101,7 +98,8 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
}
// Perform the actual fetch
Commands.Fetch(repo, remoteName, new string[0], new FetchOptions {
Commands.Fetch(repo, remoteName, new string[0], new FetchOptions
{
TagFetchMode = TagFetchMode.All,
OnUpdateTips = expectedFetchState.RemoteUpdateTipsHandler
}, null);
......@@ -117,7 +115,6 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository", "test-branch", "master")]
[InlineData("https://github.com/libgit2/TestGitRepository", "master", "master")]
[InlineData("git://github.com/libgit2/TestGitRepository.git", "master", "first-merge")]
public void CanFetchCustomRefSpecsIntoAnEmptyRepository(string url, string localBranchName, string remoteBranchName)
{
string path = InitNewRepository();
......@@ -147,7 +144,8 @@ public void CanFetchCustomRefSpecsIntoAnEmptyRepository(string url, string local
}
// Perform the actual fetch
Commands.Fetch(repo, remoteName, new string[] { refSpec }, new FetchOptions {
Commands.Fetch(repo, remoteName, new string[] { refSpec }, new FetchOptions
{
TagFetchMode = TagFetchMode.None,
OnUpdateTips = expectedFetchState.RemoteUpdateTipsHandler
}, null);
......
......@@ -3,7 +3,6 @@
using System.Linq;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;
namespace LibGit2Sharp.Tests
{
......@@ -12,7 +11,6 @@ public class NetworkFixture : BaseFixture
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
public void CanListRemoteReferences(string url)
{
string remoteName = "testRemote";
......@@ -49,7 +47,6 @@ public void CanListRemoteReferences(string url)
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
public void CanListRemoteReferencesFromUrl(string url)
{
string repoPath = InitNewRepository();
......@@ -94,9 +91,9 @@ public void CanListRemoteReferenceObjects()
Remote remote = repo.Network.Remotes[remoteName];
IEnumerable<Reference> references = repo.Network.ListReferences(remote).ToList();
var actualRefs = new List<Tuple<string,string>>();
var actualRefs = new List<Tuple<string, string>>();
foreach(Reference reference in references)
foreach (Reference reference in references)
{
Assert.NotNull(reference.CanonicalName);
......@@ -166,7 +163,7 @@ public void CanPull(FastForwardStrategy fastForwardStrategy)
MergeResult mergeResult = Commands.Pull(repo, Constants.Signature, pullOptions);
if(fastForwardStrategy == FastForwardStrategy.Default || fastForwardStrategy == FastForwardStrategy.FastForwardOnly)
if (fastForwardStrategy == FastForwardStrategy.Default || fastForwardStrategy == FastForwardStrategy.FastForwardOnly)
{
Assert.Equal(MergeStatus.FastForward, mergeResult.Status);
Assert.Equal(mergeResult.Commit, repo.Branches["refs/remotes/origin/master"].Tip);
......@@ -226,7 +223,7 @@ public void PullWithoutMergeBranchThrows()
{
Commands.Pull(repo, Constants.Signature, new PullOptions());
}
catch(MergeFetchHeadNotFoundException ex)
catch (MergeFetchHeadNotFoundException ex)
{
didPullThrow = true;
thrownException = ex;
......@@ -293,7 +290,7 @@ public void CanPruneRefs()
Assert.NotNull(repo.Refs["refs/remotes/pruner/master"]);
// but we do when asked by the user
Commands.Fetch(repo, "pruner", new string[0], new FetchOptions { Prune = true}, null);
Commands.Fetch(repo, "pruner", new string[0], new FetchOptions { Prune = true }, null);
Assert.Null(repo.Refs["refs/remotes/pruner/master"]);
}
}
......
......@@ -4,7 +4,6 @@
using System.Linq;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;
namespace LibGit2Sharp.Tests
{
......@@ -709,7 +708,6 @@ public void CanListRemoteReferencesWithCredentials()
[Theory]
[InlineData("http://github.com/libgit2/TestGitRepository")]
[InlineData("https://github.com/libgit2/TestGitRepository")]
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
public void CanListRemoteReferences(string url)
{
IEnumerable<Reference> references = Repository.ListRemoteReferences(url).ToList();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册