Skip to content

Commit bad87f5

Browse files
committed
📚 [README]
1 parent 7eb4bb9 commit bad87f5

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,24 @@
101101
};
102102
```
103103
```cpp
104-
Google.Test | GUnit.GMake
105-
--------------------------------------------+--------------------------------------------------
106-
#include <gtest/gtest.h> | #include <GUnit.h>
107-
#include <gmock/gmock.h> |
108-
|
109-
TEST(CalcTest, ShouldMakeCoffee) { | GTEST("Calc Test") {
110-
StrictMock<mock_heater> heater{}; | auto [sut, mocks] =
111-
StrictMock<mock_pump> pump{}; | make<coffee_maker, StrictGMock>();
112-
StrictMock<mock_grinder> grinder{}; |
113-
coffee_maker sut{heater, pump, grinder}; | EXPECT_CALL(mocks.mock<iheater>(), (on)());
114-
| EXPECT_CALL(mocks.mock<ipump>(), (pump)());
115-
EXPECT_CALL(heater, on()); | EXPECT_CALL(mocks.mock<igrinder>(), (grind)());
116-
EXPECT_CALL(pump, pump()); | EXPECT_CALL(mocks.mock<iheater>(), (off)());
117-
EXPECT_CALL(grinder, grind()); |
118-
EXPECT_CALL(heater, off()); | sut->brew();
119-
| }
120-
sut->brew(); |
121-
}
104+
Google.Test | GUnit.GMake
105+
------------------------------------------+--------------------------------------------------
106+
#include <gtest/gtest.h> | #include <GUnit.h>
107+
#include <gmock/gmock.h> |
108+
|
109+
TEST(CalcTest, ShouldMakeCoffee) { | GTEST("Calc Test") {
110+
StrictMock<mock_heater> heater{}; | auto [sut, mocks] =
111+
StrictMock<mock_pump> pump{}; | make<coffee_maker, StrictGMock>();
112+
StrictMock<mock_grinder> grinder{}; |
113+
coffee_maker sut{heater, pump, grinder};| EXPECT_CALL(mocks.mock<iheater>(), (on)());
114+
| EXPECT_CALL(mocks.mock<ipump>(), (pump)());
115+
EXPECT_CALL(heater, on()); | EXPECT_CALL(mocks.mock<igrinder>(), (grind)());
116+
EXPECT_CALL(pump, pump()); | EXPECT_CALL(mocks.mock<iheater>(), (off)());
117+
EXPECT_CALL(grinder, grind()); |
118+
EXPECT_CALL(heater, off()); | sut->brew();
119+
| }
120+
sut->brew(); |
121+
}
122122
```
123123

124124
> #### Support for - [Gherkin](https://github.com/cucumber/cucumber/wiki/Gherkin) style - BDD (Behaviour Driven Development) scenarios - [GUnit.GSteps](docs/GSteps.md)

0 commit comments

Comments
 (0)