O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the first C++ test

Let us recall the first scenario that we came up with:

   Scenario: One or more grocery items available      Given there is a list of available grocery items      And one or more grocery items are actually available      When I check available groceries      Then I am given the list of available grocery items      And the grocery items are ordered by name, ascending

Our first test will need to make sure that this scenario can be completed using our implementation. To do this in an efficient manner, we will have to simulate a few things, including the initiation of the user action (I check available groceries), as well as the precondition and outcome data. We want to use mock data rather than making database or web service calls so that we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required