@@ -145,30 +145,30 @@ public void AddWithNullStringThrows()
145
145
}
146
146
147
147
[ Fact ]
148
- public void CanDeleteAReference ( )
148
+ public void CanRemoveAReference ( )
149
149
{
150
150
TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo ( ) ;
151
151
using ( var repo = new Repository ( path . RepositoryPath ) )
152
152
{
153
- repo . Refs . Delete ( "refs/heads/packed" ) ;
153
+ repo . Refs . Remove ( "refs/heads/packed" ) ;
154
154
}
155
155
}
156
156
157
157
[ Fact ]
158
- public void ADeletedReferenceCannotBeLookedUp ( )
158
+ public void ARemovedReferenceCannotBeLookedUp ( )
159
159
{
160
160
TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo ( ) ;
161
161
using ( var repo = new Repository ( path . RepositoryPath ) )
162
162
{
163
163
const string refName = "refs/heads/test" ;
164
164
165
- repo . Refs . Delete ( refName ) ;
165
+ repo . Refs . Remove ( refName ) ;
166
166
Assert . Null ( repo . Refs [ refName ] ) ;
167
167
}
168
168
}
169
169
170
170
[ Fact ]
171
- public void DeletingAReferenceDecreasesTheRefsCount ( )
171
+ public void RemovingAReferenceDecreasesTheRefsCount ( )
172
172
{
173
173
TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo ( ) ;
174
174
using ( var repo = new Repository ( path . RepositoryPath ) )
@@ -178,7 +178,7 @@ public void DeletingAReferenceDecreasesTheRefsCount()
178
178
List < string > refs = repo . Refs . Select ( r => r . CanonicalName ) . ToList ( ) ;
179
179
Assert . True ( refs . Contains ( refName ) ) ;
180
180
181
- repo . Refs . Delete ( refName ) ;
181
+ repo . Refs . Remove ( refName ) ;
182
182
183
183
List < string > refs2 = repo . Refs . Select ( r => r . CanonicalName ) . ToList ( ) ;
184
184
Assert . False ( refs2 . Contains ( refName ) ) ;
@@ -188,20 +188,20 @@ public void DeletingAReferenceDecreasesTheRefsCount()
188
188
}
189
189
190
190
[ Fact ]
191
- public void DeleteWithEmptyNameThrows ( )
191
+ public void RemoveWithEmptyNameThrows ( )
192
192
{
193
193
using ( var repo = new Repository ( BareTestRepoPath ) )
194
194
{
195
- Assert . Throws < ArgumentException > ( ( ) => repo . Refs . Delete ( string . Empty ) ) ;
195
+ Assert . Throws < ArgumentException > ( ( ) => repo . Refs . Remove ( string . Empty ) ) ;
196
196
}
197
197
}
198
198
199
199
[ Fact ]
200
- public void DeleteWithNullNameThrows ( )
200
+ public void RemoveWithNullNameThrows ( )
201
201
{
202
202
using ( var repo = new Repository ( BareTestRepoPath ) )
203
203
{
204
- Assert . Throws < ArgumentNullException > ( ( ) => repo . Refs . Delete ( null ) ) ;
204
+ Assert . Throws < ArgumentNullException > ( ( ) => repo . Refs . Remove ( null ) ) ;
205
205
}
206
206
}
207
207
@@ -335,7 +335,7 @@ public void CanUpdateTargetOnSymbolicReference()
335
335
newRef = ( SymbolicReference ) repo . Refs [ newRef . CanonicalName ] ;
336
336
Assert . Equal ( repo . Refs [ "refs/heads/test" ] . ResolveToDirectReference ( ) . Target , newRef . ResolveToDirectReference ( ) . Target ) ;
337
337
338
- repo . Refs . Delete ( newRef . CanonicalName ) ;
338
+ repo . Refs . Remove ( newRef . CanonicalName ) ;
339
339
}
340
340
}
341
341
@@ -371,7 +371,7 @@ public void UpdatingADirectRefWithSymbolFails()
371
371
Assert . Throws < ArgumentException > (
372
372
( ) => repo . Refs . UpdateTarget ( newRef . CanonicalName , repo . Refs [ "refs/heads/test" ] . ResolveToDirectReference ( ) . Target . Sha ) ) ;
373
373
374
- repo . Refs . Delete ( newRef . CanonicalName ) ;
374
+ repo . Refs . Remove ( newRef . CanonicalName ) ;
375
375
}
376
376
}
377
377
0 commit comments