ava-innersource / Liquid-Application-Framework-1.0-deprecated

Liquid is a framework to speed up the development of microservices
MIT License
25 stars 14 forks source link

feat: add unit tests to LightApi #152

Closed bruno-brant closed 4 years ago

bruno-brant commented 4 years ago

This is a minimal set of unit tests to improve the situation of LightApi. It isn't enough, but should be enough to enable correcting some stuff without breaking others.

As stated in #150, LightApi should be deprecated.

This will close #150.

guilhermeluizsp commented 4 years ago

@bruno-brant Is there any reason for not creating a test case for the LightApi.Delete<T> method?

bruno-brant commented 4 years ago

Is there any reason for not creating a test case for the LightApi.Delete method?

Not really.

But: Delete is the most bug-filled method of this class. There's even a catch all that will result in success even if the remote resource wasn't deleted.

So, I'm not trying to really provide good coverage for this class, because, as I've stated at #150, I firmly believe that we should retire LightApi as soon as possible.

I'm just pondering what would be the best approach; probably include a client factory in Workbench, so client code would no be coupled to it. And I'm considering using RestSharp for that.

Of course, this is still temporary, until we move forward with the complete removal of Workbench.

bruno-brant commented 4 years ago

Done, I've submitted the fixes.

bruno-brant commented 4 years ago

I'll rebase this branch later on today or early tomorrow.

bruno-brant commented 4 years ago

Hey @guilhermeluizsp can you please approve again? I've just rebased the branch to avoid the merge commit.