Closed ghost closed 6 years ago
May I propose solution # 5?
That would be very welcomed, and we're definitely open to merging it in :-)
To not mess things up too much we just added interfaces that we needed for our mocking purposes. Hope to see it running soon enough ;-) Thanks for the answer.
/kn
Thanks! Making a few additions. Would it matter if e.g. IIssue
was not merged? Or would you need those simple objects as interfaces as well?
@maartenba we won't mind it. We will manage without IIssue. All we need are interfaces from services classes I added. IIssue was "just in case" addition and we won't really have to mock it. Sorry for the inconvenience!
No worries. Will merge it into develop
and release an alpha build on NuGet later on which you can test with. Thanks for your contribution and suggestion!
(and because introducing these interfaces means version should go to 4.0, I will also target .NET Standard 2.0)
Glad to have this issue solved! Thank you 👍
There you go :) https://github.com/JetBrains/YouTrackSharp/releases/tag/4.0.0-develop-201808210153 (pushed to NuGet, should be visible there soon, too)
What we want to do...
is to make unit tests base on YouTrackSharp classes like IssuesService and so I don't want to call server too often. Instead I would rather use interface of the class to mock it in any mocking package so no changes are applied during tests on company's YouTrack.
The problem is...
that there are no interfaces what is pretty dissapointing and there are few ways around to solve this but they are not prefered as they use tricks instead of clear logic.
Solutions...
that we identified (yet to test) are:
Action...
that I took was creating those interfaces and commiting to develop branch.
Any help or advise would be apprieciated, Krzysztof Nowicki