@@ -136,7 +136,7 @@ public void CreatingBranchWithUnknownNamedTargetThrows()
136136 {
137137 using ( var repo = new Repository ( BareTestRepoPath ) )
138138 {
139- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Create ( "my_new_branch" , "my_old_branch" ) ) ;
139+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Add ( "my_new_branch" , "my_old_branch" ) ) ;
140140 }
141141 }
142142
@@ -145,8 +145,8 @@ public void CreatingBranchWithUnknownShaTargetThrows()
145145 {
146146 using ( var repo = new Repository ( BareTestRepoPath ) )
147147 {
148- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Create ( "my_new_branch" , Constants . UnknownSha ) ) ;
149- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Create ( "my_new_branch" , Constants . UnknownSha . Substring ( 0 , 7 ) ) ) ;
148+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Add ( "my_new_branch" , Constants . UnknownSha ) ) ;
149+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Add ( "my_new_branch" , Constants . UnknownSha . Substring ( 0 , 7 ) ) ) ;
150150 }
151151 }
152152
@@ -155,7 +155,7 @@ public void CreatingABranchPointingAtANonCanonicalReferenceThrows()
155155 {
156156 using ( var repo = new Repository ( BareTestRepoPath ) )
157157 {
158- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Create ( "nocanonicaltarget" , "br2" ) ) ;
158+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Add ( "nocanonicaltarget" , "br2" ) ) ;
159159 }
160160 }
161161
@@ -164,10 +164,10 @@ public void CreatingBranchWithBadParamsThrows()
164164 {
165165 using ( var repo = new Repository ( BareTestRepoPath ) )
166166 {
167- Assert . Throws < ArgumentNullException > ( ( ) => repo . Branches . Create ( null , repo . Head . CanonicalName ) ) ;
168- Assert . Throws < ArgumentException > ( ( ) => repo . Branches . Create ( string . Empty , repo . Head . CanonicalName ) ) ;
169- Assert . Throws < ArgumentNullException > ( ( ) => repo . Branches . Create ( "bad_branch" , default ( string ) ) ) ;
170- Assert . Throws < ArgumentException > ( ( ) => repo . Branches . Create ( "bad_branch" , string . Empty ) ) ;
167+ Assert . Throws < ArgumentNullException > ( ( ) => repo . Branches . Add ( null , repo . Head . CanonicalName ) ) ;
168+ Assert . Throws < ArgumentException > ( ( ) => repo . Branches . Add ( string . Empty , repo . Head . CanonicalName ) ) ;
169+ Assert . Throws < ArgumentNullException > ( ( ) => repo . Branches . Add ( "bad_branch" , default ( string ) ) ) ;
170+ Assert . Throws < ArgumentException > ( ( ) => repo . Branches . Add ( "bad_branch" , string . Empty ) ) ;
171171 Assert . Throws < ArgumentNullException > ( ( ) => repo . CreateBranch ( "bad_branch" , default ( Commit ) ) ) ;
172172 }
173173 }
@@ -519,7 +519,7 @@ public void TwoBranchesPointingAtTheSameCommitAreNotBothCurrent()
519519 {
520520 Branch master = repo . Branches [ "refs/heads/master" ] ;
521521
522- Branch newBranch = repo . Branches . Create ( "clone-of-master" , master . Tip . Sha ) ;
522+ Branch newBranch = repo . Branches . Add ( "clone-of-master" , master . Tip . Sha ) ;
523523 Assert . False ( newBranch . IsCurrentRepositoryHead ) ;
524524 }
525525 }
0 commit comments