diff options
-rw-r--r-- | libnos/generator/test/test.cpp | 4 | ||||
-rw-r--r-- | libnos/test/include/nos/MockNuggetClient.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libnos/generator/test/test.cpp b/libnos/generator/test/test.cpp index 4542c88..f6a4835 100644 --- a/libnos/generator/test/test.cpp +++ b/libnos/generator/test/test.cpp @@ -79,7 +79,7 @@ TEST(GeneratedServiceClientTest, DataSuccessfullyExchanged) { GreetResponse response; response.set_greeting("Hello, Tester age 78"); - std::vector<uint8_t> responseBytes(response.ByteSize()); + std::vector<uint8_t> responseBytes(response.ByteSizeLong()); ASSERT_TRUE(response.SerializeToArray(responseBytes.data(), responseBytes.size())); EXPECT_CALL(client, CallApp(_, _, DecodesToProtoMessage(request), _)) @@ -114,7 +114,7 @@ TEST(GeneratedServiceClientTest, AppErrorsPropagatedWithoutResponseDecode) { GreetResponse response; response.set_greeting("Ignore me"); - std::vector<uint8_t> responseBytes(response.ByteSize()); + std::vector<uint8_t> responseBytes(response.ByteSizeLong()); ASSERT_TRUE(response.SerializeToArray(responseBytes.data(), responseBytes.size())); EXPECT_CALL(client, CallApp(_, _, _, _)) diff --git a/libnos/test/include/nos/MockNuggetClient.h b/libnos/test/include/nos/MockNuggetClient.h index 48814c9..19e7f00 100644 --- a/libnos/test/include/nos/MockNuggetClient.h +++ b/libnos/test/include/nos/MockNuggetClient.h @@ -33,6 +33,9 @@ struct MockNuggetClient : public NuggetClientInterface { MOCK_METHOD4(CallApp, uint32_t(uint32_t, uint16_t, const std::vector<uint8_t>&, std::vector<uint8_t>*)); + MOCK_METHOD6(CallApp, uint32_t(uint32_t, uint16_t, + const void*, uint32_t, + void*, uint32_t*)); MOCK_CONST_METHOD0(Reset, uint32_t()); }; |