I'm just beginning with Google Test. I think I understand the premise, and want to get started with my first test. Say I have a header file that looks like this:
You can probably imagine what each of these functions does. Note that all of them are void. I'd like to begin by testing roll(), which calls Die.roll() for each Die in the collection. Note, I have access to each die face via
1 2 3 4
Dice myHand;
std::vector<int> faces;
for(auto x : myHand)
faces.push_back(x.face());
I'd like to write a test that mocks out the Dice, like above and test if each of the die faces are between 0 - 6, but I'm not sure exactly how that translates into Gtest code.