@@ -20,10 +20,10 @@ public void CanCreateBranch(string name)
20
20
{
21
21
Branch newBranch = repo . CreateBranch ( name , "be3563ae3f795b2b4353bcce3a527ad0a4f7f644" ) ;
22
22
newBranch . ShouldNotBeNull ( ) ;
23
- newBranch . Name . ShouldEqual ( name ) ;
24
- newBranch . CanonicalName . ShouldEqual ( "refs/heads/" + name ) ;
23
+ Assert . Equal ( name , newBranch . Name ) ;
24
+ Assert . Equal ( "refs/heads/" + name , newBranch . CanonicalName ) ;
25
25
newBranch . Tip . ShouldNotBeNull ( ) ;
26
- newBranch . Tip . Sha . ShouldEqual ( "be3563ae3f795b2b4353bcce3a527ad0a4f7f644" ) ;
26
+ Assert . Equal ( "be3563ae3f795b2b4353bcce3a527ad0a4f7f644" , newBranch . Tip . Sha ) ;
27
27
repo . Branches . SingleOrDefault ( p => p . Name == name ) . ShouldNotBeNull ( ) ;
28
28
29
29
repo . Branches . Delete ( newBranch . Name ) ;
@@ -38,8 +38,8 @@ public void CanCreateBranchUsingAbbreviatedSha()
38
38
{
39
39
const string name = "unit_test" ;
40
40
Branch newBranch = repo . CreateBranch ( name , "be3563a" ) ;
41
- newBranch . CanonicalName . ShouldEqual ( "refs/heads/" + name ) ;
42
- newBranch . Tip . Sha . ShouldEqual ( "be3563ae3f795b2b4353bcce3a527ad0a4f7f644" ) ;
41
+ Assert . Equal ( "refs/heads/" + name , newBranch . CanonicalName ) ;
42
+ Assert . Equal ( "be3563ae3f795b2b4353bcce3a527ad0a4f7f644" , newBranch . Tip . Sha ) ;
43
43
}
44
44
}
45
45
@@ -52,11 +52,11 @@ public void CanCreateBranchFromImplicitHead()
52
52
const string name = "unit_test" ;
53
53
Branch newBranch = repo . CreateBranch ( name ) ;
54
54
newBranch . ShouldNotBeNull ( ) ;
55
- newBranch . Name . ShouldEqual ( name ) ;
56
- newBranch . CanonicalName . ShouldEqual ( "refs/heads/" + name ) ;
55
+ Assert . Equal ( name , newBranch . Name ) ;
56
+ Assert . Equal ( "refs/heads/" + name , newBranch . CanonicalName ) ;
57
57
Assert . False ( newBranch . IsCurrentRepositoryHead ) ;
58
58
newBranch . Tip . ShouldNotBeNull ( ) ;
59
- newBranch . Tip . Sha . ShouldEqual ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" ) ;
59
+ Assert . Equal ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" , newBranch . Tip . Sha ) ;
60
60
repo . Branches . SingleOrDefault ( p => p . Name == name ) . ShouldNotBeNull ( ) ;
61
61
}
62
62
}
@@ -70,7 +70,7 @@ public void CanCreateBranchFromExplicitHead()
70
70
const string name = "unit_test" ;
71
71
Branch newBranch = repo . CreateBranch ( name , "HEAD" ) ;
72
72
newBranch . ShouldNotBeNull ( ) ;
73
- newBranch . Tip . Sha . ShouldEqual ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" ) ;
73
+ Assert . Equal ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" , newBranch . Tip . Sha ) ;
74
74
}
75
75
}
76
76
@@ -84,7 +84,7 @@ public void CanCreateBranchFromCommit()
84
84
var commit = repo . Lookup < Commit > ( "HEAD" ) ;
85
85
Branch newBranch = repo . CreateBranch ( name , commit ) ;
86
86
newBranch . ShouldNotBeNull ( ) ;
87
- newBranch . Tip . Sha . ShouldEqual ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" ) ;
87
+ Assert . Equal ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" , newBranch . Tip . Sha ) ;
88
88
}
89
89
}
90
90
@@ -97,7 +97,7 @@ public void CreatingABranchFromATagPeelsToTheCommit()
97
97
const string name = "i-peel-tag" ;
98
98
Branch newBranch = repo . CreateBranch ( name , "refs/tags/test" ) ;
99
99
newBranch . ShouldNotBeNull ( ) ;
100
- newBranch . Tip . Sha . ShouldEqual ( "e90810b8df3e80c413d903f631643c716887138d" ) ;
100
+ Assert . Equal ( "e90810b8df3e80c413d903f631643c716887138d" , newBranch . Tip . Sha ) ;
101
101
}
102
102
}
103
103
@@ -111,7 +111,7 @@ public void CreatingABranchTriggersTheCreationOfADirectReference()
111
111
Assert . False ( newBranch . IsCurrentRepositoryHead ) ;
112
112
113
113
ObjectId commitId = repo . Head . Tip . Id ;
114
- newBranch . Tip . Id . ShouldEqual ( commitId ) ;
114
+ Assert . Equal ( commitId , newBranch . Tip . Id ) ;
115
115
116
116
Reference reference = repo . Refs [ newBranch . CanonicalName ] ;
117
117
reference . ShouldNotBeNull ( ) ;
@@ -179,7 +179,7 @@ public void CanListAllBranches()
179
179
{
180
180
Assert . Equal ( expectedBranches , repo . Branches . Select ( b => b . Name ) . ToArray ( ) ) ;
181
181
182
- repo . Branches . Count ( ) . ShouldEqual ( 5 ) ;
182
+ Assert . Equal ( 5 , repo . Branches . Count ( ) ) ;
183
183
}
184
184
}
185
185
@@ -222,13 +222,13 @@ public void CanLookupABranchByItsCanonicalName()
222
222
{
223
223
Branch branch = repo . Branches [ "refs/heads/br2" ] ;
224
224
branch . ShouldNotBeNull ( ) ;
225
- branch . Name . ShouldEqual ( "br2" ) ;
225
+ Assert . Equal ( "br2" , branch . Name ) ;
226
226
227
227
Branch branch2 = repo . Branches [ "refs/heads/br2" ] ;
228
228
branch2 . ShouldNotBeNull ( ) ;
229
- branch2 . Name . ShouldEqual ( "br2" ) ;
229
+ Assert . Equal ( "br2" , branch2 . Name ) ;
230
230
231
- branch2 . ShouldEqual ( branch ) ;
231
+ Assert . Equal ( branch , branch2 ) ;
232
232
( branch2 == branch ) . ShouldBeTrue ( ) ;
233
233
}
234
234
}
@@ -241,10 +241,10 @@ public void CanLookupLocalBranch()
241
241
Branch master = repo . Branches [ "master" ] ;
242
242
master . ShouldNotBeNull ( ) ;
243
243
Assert . False ( master . IsRemote ) ;
244
- master . Name . ShouldEqual ( "master" ) ;
245
- master . CanonicalName . ShouldEqual ( "refs/heads/master" ) ;
244
+ Assert . Equal ( "master" , master . Name ) ;
245
+ Assert . Equal ( "refs/heads/master" , master . CanonicalName ) ;
246
246
master . IsCurrentRepositoryHead . ShouldBeTrue ( ) ;
247
- master . Tip . Sha . ShouldEqual ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" ) ;
247
+ Assert . Equal ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" , master . Tip . Sha ) ;
248
248
}
249
249
}
250
250
@@ -260,7 +260,7 @@ public void CanLookupABranchWhichNameIsMadeOfNon7BitsAsciiCharacters()
260
260
261
261
Branch retrieved = repo . Branches [ "Ångström" ] ;
262
262
retrieved . ShouldNotBeNull ( ) ;
263
- retrieved . Tip . ShouldEqual ( newBranch . Tip ) ;
263
+ Assert . Equal ( newBranch . Tip , retrieved . Tip ) ;
264
264
}
265
265
}
266
266
@@ -283,8 +283,8 @@ public void TrackingInformationIsEmptyForNonTrackingBranch()
283
283
Branch branch = repo . Branches [ "test" ] ;
284
284
Assert . False ( branch . IsTracking ) ;
285
285
branch . TrackedBranch . ShouldBeNull ( ) ;
286
- branch . AheadBy . ShouldEqual ( 0 ) ;
287
- branch . BehindBy . ShouldEqual ( 0 ) ;
286
+ Assert . Equal ( 0 , branch . AheadBy ) ;
287
+ Assert . Equal ( 0 , branch . BehindBy ) ;
288
288
}
289
289
}
290
290
@@ -295,9 +295,9 @@ public void CanGetTrackingInformationForTrackingBranch()
295
295
{
296
296
Branch master = repo . Branches [ "master" ] ;
297
297
master . IsTracking . ShouldBeTrue ( ) ;
298
- master . TrackedBranch . ShouldEqual ( repo . Branches [ "refs/remotes/origin/master" ] ) ;
299
- master . AheadBy . ShouldEqual ( 2 ) ;
300
- master . BehindBy . ShouldEqual ( 2 ) ;
298
+ Assert . Equal ( repo . Branches [ "refs/remotes/origin/master" ] , master . TrackedBranch ) ;
299
+ Assert . Equal ( 2 , master . AheadBy ) ;
300
+ Assert . Equal ( 2 , master . BehindBy ) ;
301
301
}
302
302
}
303
303
@@ -308,9 +308,9 @@ public void CanGetTrackingInformationForLocalTrackingBranch()
308
308
{
309
309
var branch = repo . Branches [ "track-local" ] ;
310
310
branch . IsTracking . ShouldBeTrue ( ) ;
311
- branch . TrackedBranch . ShouldEqual ( repo . Branches [ "master" ] ) ;
312
- branch . AheadBy . ShouldEqual ( 2 ) ;
313
- branch . BehindBy . ShouldEqual ( 2 ) ;
311
+ Assert . Equal ( repo . Branches [ "master" ] , branch . TrackedBranch ) ;
312
+ Assert . Equal ( 2 , branch . AheadBy ) ;
313
+ Assert . Equal ( 2 , branch . BehindBy ) ;
314
314
}
315
315
}
316
316
@@ -320,7 +320,7 @@ public void CanWalkCommitsFromAnotherBranch()
320
320
using ( var repo = new Repository ( BareTestRepoPath ) )
321
321
{
322
322
Branch master = repo . Branches [ "test" ] ;
323
- master . Commits . Count ( ) . ShouldEqual ( 2 ) ;
323
+ Assert . Equal ( 2 , master . Commits . Count ( ) ) ;
324
324
}
325
325
}
326
326
@@ -330,7 +330,7 @@ public void CanWalkCommitsFromBranch()
330
330
using ( var repo = new Repository ( BareTestRepoPath ) )
331
331
{
332
332
Branch master = repo . Branches [ "master" ] ;
333
- master . Commits . Count ( ) . ShouldEqual ( 7 ) ;
333
+ Assert . Equal ( 7 , master . Commits . Count ( ) ) ;
334
334
}
335
335
}
336
336
@@ -353,7 +353,7 @@ public void CanCheckoutAnExistingBranch(string name)
353
353
354
354
Assert . False ( test . IsRemote ) ;
355
355
test . IsCurrentRepositoryHead . ShouldBeTrue ( ) ;
356
- test . ShouldEqual ( repo . Head ) ;
356
+ Assert . Equal ( repo . Head , test ) ;
357
357
358
358
Assert . False ( master . IsCurrentRepositoryHead ) ;
359
359
}
@@ -375,7 +375,7 @@ public void CanCheckoutAnExistingBranchByName(string name)
375
375
376
376
Assert . False ( test . IsRemote ) ;
377
377
test . IsCurrentRepositoryHead . ShouldBeTrue ( ) ;
378
- test . ShouldEqual ( repo . Head ) ;
378
+ Assert . Equal ( repo . Head , test ) ;
379
379
380
380
Assert . False ( master . IsCurrentRepositoryHead ) ;
381
381
}
@@ -397,11 +397,11 @@ public void CanCheckoutAnArbitraryCommit(string commitPointer)
397
397
repo . Info . IsHeadDetached . ShouldBeTrue ( ) ;
398
398
399
399
Assert . False ( detachedHead . IsRemote ) ;
400
- detachedHead . CanonicalName . ShouldEqual ( detachedHead . Name ) ;
401
- detachedHead . CanonicalName . ShouldEqual ( "(no branch)" ) ;
402
- detachedHead . Tip . Sha . ShouldEqual ( repo . Lookup ( commitPointer ) . Sha ) ;
400
+ Assert . Equal ( detachedHead . Name , detachedHead . CanonicalName ) ;
401
+ Assert . Equal ( "(no branch)" , detachedHead . CanonicalName ) ;
402
+ Assert . Equal ( repo . Lookup ( commitPointer ) . Sha , detachedHead . Tip . Sha ) ;
403
403
404
- detachedHead . ShouldEqual ( repo . Head ) ;
404
+ Assert . Equal ( repo . Head , detachedHead ) ;
405
405
406
406
Assert . False ( master . IsCurrentRepositoryHead ) ;
407
407
detachedHead . IsCurrentRepositoryHead . ShouldBeTrue ( ) ;
@@ -533,7 +533,7 @@ public void CanMoveABranch()
533
533
repo . Branches [ "br3" ] . ShouldBeNull ( ) ;
534
534
535
535
Branch newBranch = repo . Branches . Move ( "br2" , "br3" ) ;
536
- newBranch . Name . ShouldEqual ( "br3" ) ;
536
+ Assert . Equal ( "br3" , newBranch . Name ) ;
537
537
538
538
repo . Branches [ "br2" ] . ShouldBeNull ( ) ;
539
539
repo . Branches [ "br3" ] . ShouldNotBeNull ( ) ;
@@ -562,15 +562,15 @@ public void CanMoveABranchWhileOverwritingAnExistingOne()
562
562
br2 . ShouldNotBeNull ( ) ;
563
563
564
564
Branch newBranch = repo . Branches . Move ( "br2" , "test" , true ) ;
565
- newBranch . Name . ShouldEqual ( "test" ) ;
565
+ Assert . Equal ( "test" , newBranch . Name ) ;
566
566
567
567
repo . Branches [ "br2" ] . ShouldBeNull ( ) ;
568
568
569
569
Branch newTest = repo . Branches [ "test" ] ;
570
570
newTest . ShouldNotBeNull ( ) ;
571
- newTest . ShouldEqual ( newBranch ) ;
571
+ Assert . Equal ( newBranch , newTest ) ;
572
572
573
- newTest . Tip . ShouldEqual ( br2 . Tip ) ;
573
+ Assert . Equal ( br2 . Tip , newTest . Tip ) ;
574
574
}
575
575
}
576
576
}
0 commit comments