How to set up both GoogleTest and GoogleMock in Visual Studio?
问题 With Visual Studio 2017/2019 it is really easy to set up a new Google Test project and start writing tests (as long as you don't mind using older versions of GoogleTest versions anyway). But what about using GoogleMock as well? You would think that since Google combined gtest/gmock some time ago that this would just work. Just #include "gmock/gmock.h" and mock away. But no, the GoogleTest NuGet package that is automatically added by the template does not include the gmock folder at all.