MitjaBezensek / SharpBucket

SharpBucket is a .Net wrapper for the Bitbucket's REST API.
MIT License
67 stars 60 forks source link

Added async methods for EndPoint APIs. #132

Closed Casualrobin closed 4 years ago

Casualrobin commented 5 years ago

[Test] DeleteBranchAsync_ExistingBranch_BrancCouldNotBeListedAnymore() Is failing. I can't see why with my local debug. Open to suggestions.

mnivet commented 4 years ago

[Test] DeleteBranchAsync_ExistingBranch_BrancCouldNotBeListedAnymore() Is failing. I can't see why with my local debug. Open to suggestions.

It's because the test DeleteBranch_ExistingBranch_BrancCouldNotBeListedAnymore had already delete the branch. If you run each test in separate runs it will works, but if you run both in a single tests run it will fail since we don't re-create the test repository with all the branches between each tests. The code setup a test repository with various things in it, then all the tests do things on that test repository.

Possible solutions :

With current test code structure it seems easier to go with the second option. Just complete the code here : https://github.com/MitjaBezensek/SharpBucket/blob/master/SharpBucketTests/GitHelpers/TestRepositoryBuilder.cs#L83