Skip to content

Commit 0847c10

Browse files
committed
📚 [README]
1 parent bad87f5 commit 0847c10

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,23 @@
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(); |
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(); |
121121
}
122122
```
123123

0 commit comments

Comments
 (0)