|
1 |
| -using System.Collections.Generic; |
2 |
| -using LibGit2Sharp.Tests.TestHelpers; |
| 1 | +using LibGit2Sharp.Tests.TestHelpers; |
3 | 2 | using Xunit;
|
4 | 3 | using Xunit.Extensions;
|
5 | 4 |
|
@@ -68,106 +67,6 @@ public void CanCheckEqualityOfRemote()
|
68 | 67 | }
|
69 | 68 | }
|
70 | 69 |
|
71 |
| - [Theory] |
72 |
| - [InlineData("http://github.com/libgit2/TestGitRepository")] |
73 |
| - [InlineData("https://github.com/libgit2/TestGitRepository")] |
74 |
| - [InlineData("git://github.com/libgit2/TestGitRepository.git")] |
75 |
| - public void CanFetchIntoAnEmptyRepository(string url) |
76 |
| - { |
77 |
| - string remoteName = "testRemote"; |
78 |
| - |
79 |
| - var scd = BuildSelfCleaningDirectory(); |
80 |
| - using (var repo = Repository.Init(scd.RootedDirectoryPath)) |
81 |
| - { |
82 |
| - Remote remote = repo.Network.Remotes.Add(remoteName, url); |
83 |
| - |
84 |
| - // Set up structures for the expected results |
85 |
| - // and verifying the RemoteUpdateTips callback. |
86 |
| - TestRemoteInfo expectedResults = TestRemoteInfo.TestRemoteInstance; |
87 |
| - ExpectedFetchState expectedFetchState = new ExpectedFetchState(remoteName); |
88 |
| - |
89 |
| - // Add expected branch objects |
90 |
| - foreach (KeyValuePair<string, ObjectId> kvp in expectedResults.BranchTips) |
91 |
| - { |
92 |
| - expectedFetchState.AddExpectedBranch(kvp.Key, ObjectId.Zero, kvp.Value); |
93 |
| - } |
94 |
| - |
95 |
| - // Add the expected tags |
96 |
| - string[] expectedTagNames = { "blob", "commit_tree", "annotated_tag" }; |
97 |
| - foreach (string tagName in expectedTagNames) |
98 |
| - { |
99 |
| - TestRemoteInfo.ExpectedTagInfo expectedTagInfo = expectedResults.Tags[tagName]; |
100 |
| - expectedFetchState.AddExpectedTag(tagName, ObjectId.Zero, expectedTagInfo); |
101 |
| - } |
102 |
| - |
103 |
| - // Perform the actual fetch |
104 |
| - remote.Fetch(onUpdateTips: expectedFetchState.RemoteUpdateTipsHandler); |
105 |
| - |
106 |
| - // Verify the expected |
107 |
| - expectedFetchState.CheckUpdatedReferences(repo); |
108 |
| - } |
109 |
| - } |
110 |
| - |
111 |
| - [SkippableFact] |
112 |
| - public void CanFetchIntoAnEmptyRepositoryWithCredentials() |
113 |
| - { |
114 |
| - InconclusiveIf(() => string.IsNullOrEmpty(Constants.PrivateRepoUrl), |
115 |
| - "Populate Constants.PrivateRepo* to run this test"); |
116 |
| - |
117 |
| - string remoteName = "testRemote"; |
118 |
| - |
119 |
| - var scd = BuildSelfCleaningDirectory(); |
120 |
| - using (var repo = Repository.Init(scd.RootedDirectoryPath)) |
121 |
| - { |
122 |
| - Remote remote = repo.Network.Remotes.Add(remoteName, Constants.PrivateRepoUrl); |
123 |
| - |
124 |
| - // Perform the actual fetch |
125 |
| - remote.Fetch(credentials: new Credentials |
126 |
| - { |
127 |
| - Username = Constants.PrivateRepoUsername, |
128 |
| - Password = Constants.PrivateRepoPassword |
129 |
| - }); |
130 |
| - } |
131 |
| - } |
132 |
| - |
133 |
| - [Theory] |
134 |
| - [InlineData("http://github.com/libgit2/TestGitRepository")] |
135 |
| - [InlineData("https://github.com/libgit2/TestGitRepository")] |
136 |
| - [InlineData("git://github.com/libgit2/TestGitRepository.git")] |
137 |
| - public void CanFetchAllTagsIntoAnEmptyRepository(string url) |
138 |
| - { |
139 |
| - string remoteName = "testRemote"; |
140 |
| - |
141 |
| - var scd = BuildSelfCleaningDirectory(); |
142 |
| - using (var repo = Repository.Init(scd.RootedDirectoryPath)) |
143 |
| - { |
144 |
| - Remote remote = repo.Network.Remotes.Add(remoteName, url); |
145 |
| - |
146 |
| - // Set up structures for the expected results |
147 |
| - // and verifying the RemoteUpdateTips callback. |
148 |
| - TestRemoteInfo remoteInfo = TestRemoteInfo.TestRemoteInstance; |
149 |
| - ExpectedFetchState expectedFetchState = new ExpectedFetchState(remoteName); |
150 |
| - |
151 |
| - // Add expected branch objects |
152 |
| - foreach (KeyValuePair<string, ObjectId> kvp in remoteInfo.BranchTips) |
153 |
| - { |
154 |
| - expectedFetchState.AddExpectedBranch(kvp.Key, ObjectId.Zero, kvp.Value); |
155 |
| - } |
156 |
| - |
157 |
| - // Add expected tags |
158 |
| - foreach (KeyValuePair<string, TestRemoteInfo.ExpectedTagInfo> kvp in remoteInfo.Tags) |
159 |
| - { |
160 |
| - expectedFetchState.AddExpectedTag(kvp.Key, ObjectId.Zero, kvp.Value); |
161 |
| - } |
162 |
| - |
163 |
| - // Perform the actual fetch |
164 |
| - remote.Fetch(TagFetchMode.All, onUpdateTips: expectedFetchState.RemoteUpdateTipsHandler); |
165 |
| - |
166 |
| - // Verify the expected |
167 |
| - expectedFetchState.CheckUpdatedReferences(repo); |
168 |
| - } |
169 |
| - } |
170 |
| - |
171 | 70 | [Fact]
|
172 | 71 | public void CreatingANewRemoteAddsADefaultRefSpec()
|
173 | 72 | {
|
|
0 commit comments