3 ms·
You can add a static "InitTest" method somewhere which initializes the modules. Use a double checked locking pattern [1] in there to make sure, that you instant
by zubspace 7y ago
You can add a static "InitTest" method somewhere which initializes the modules. Use a double checked locking pattern [1] in there to make sure, that you instantiate and assign the modules used for testing exactly once.
[1] https://en.wikipedia.org/wiki/Double-checked_locking https://en.wikipedia.org/wiki/Double-checked_locking