I made a peek-a-boo reference last week and forgot to make this joke: Wound up in the hospital after a peek-a-boo accident. They put me in the ICU. Ha! (I remind you that this newsletter is free)
So, there is a third way of testing your AstroService which would not require you to mock anything at class level yet make your tests independent of network or availability of the web service your code talks to - mock out the http responses of the web service. There are many libraries that can do it but my favourite one is WireMock. Hopefully it’s cause it’s good and not because I personally know the creator… 🙂
So, there is a third way of testing your AstroService which would not require you to mock anything at class level yet make your tests independent of network or availability of the web service your code talks to - mock out the http responses of the web service. There are many libraries that can do it but my favourite one is WireMock. Hopefully it’s cause it’s good and not because I personally know the creator… 🙂