| 32 | EXPECT_NE(dynamic_cast<const classname*>(expression), (void*)NULL) |
| 33 | |
| 34 | class WireMessageCodecTest : public Test { |
| 35 | protected: |
| 36 | std::shared_ptr<WireCommand> commandAutoPtr; |
| 37 | |
| 38 | WireCommand& decode(const char* jsonStr) { |
| 39 | commandAutoPtr = codec.decode(jsonStr); |
| 40 | return *commandAutoPtr; |
| 41 | } |
| 42 | |
| 43 | std::string encode(const WireResponse& response) const { |
| 44 | return codec.encode(response); |
| 45 | } |
| 46 | |
| 47 | protected: |
| 48 | const JsonWireMessageCodec codec; |
| 49 | }; |
| 50 | |
| 51 | /* |
| 52 | * Request decoding |