I try to run several tests in once (using GoogleTest) on source code I wrote containing static const
variable initialized through network (which is "mocked" to imitate real behavior).
Example static const std::string myStr{getNameFromNetwork()};
The fact is in the first test the mock on getNameFromNetwork()
is OK, but from the second to the last test, the mock is too much because the variable is static AND already initialized.
Do you have any proposal to solve this problem ?