I have been trying to learn more about MicroServices architecture and I am using Microsoft's eShopOnContainers as a reference because I am familiar with .NET. I am getting into the part about testing, but I noticed that all the tests in the service API folders are referencing the WebMVC project and not the Service.API whatsoever. I have been trying to understand this and haven't been able to figure it out. The Documentation for the tests say you should be able to pull out each of those API folders into their own git repos, but wouldn't they just all have dependency on the WebMVC project? Any help understanding this is greatly appreciated.

  • 1
    are you sure about that? I just checked the ptoject file in that order test you link and it seems to reference order.api – Ewan Mar 10 '19 at 9:08
  • The test project contains a reference to the API project, but none of the tests seem to actually reference the API classes. – Robin Lashof-Regas Mar 10 '19 at 22:31
  • It'd probably be good to update the question title, because tests DO reference API classes, although they should not reference WebMVC classes. You can check by [F12] on the OrdersController in OrderWebApiTest. – Miguel Veloso Mar 11 '19 at 10:43

You're right, it's actually a bug.

It was probably just a left over while developing the unit tests, because the methods being tested there are also covered in OrderWebApiTest.

However, they do test API Classes, but should not test the WebMVC OrderController.

Not the answer you're looking for? Browse other questions tagged or ask your own question.