1.2.4. Expectation Set

There are also cases where you have a number of values which must all occur but the order is not relevant at all. t even does not matter if an actual value is added more than once. For that purpose mockpp provides a set oriented data type. See the next example:


  ExpectationSet <int> es ("verifyValue", 0);
  es.addExpected(1);
  es.addExpected(2);
  es.addExpected(3);

  es.addActual(3);
  es.addActual(2);
  es.addActual(1);
  es.addActual(3); 1
  es.addActual(2);
  es.addActual(1);

1

Adding the same actual value more than once is ok for the set.