diff options
Diffstat (limited to 'src/mongo/rpc/command_request_builder_test.cpp')
-rw-r--r-- | src/mongo/rpc/command_request_builder_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/rpc/command_request_builder_test.cpp b/src/mongo/rpc/command_request_builder_test.cpp index 7e96f06b184..fe9539d41d2 100644 --- a/src/mongo/rpc/command_request_builder_test.cpp +++ b/src/mongo/rpc/command_request_builder_test.cpp @@ -74,12 +74,12 @@ TEST(RequestBuilder, RoundTrip) { .setMetadata(metadata) .done(); - rpc::CommandRequest parsed(&msg); + auto parsed = mongo::rpc::ParsedOpCommand::parse(msg); - ASSERT_EQUALS(parsed.getDatabase(), databaseName); - ASSERT_EQUALS(parsed.getCommandName(), commandName); - ASSERT_BSONOBJ_EQ(parsed.getMetadata(), metadata); - ASSERT_BSONOBJ_EQ(parsed.getCommandArgs(), commandArgs); + ASSERT_EQUALS(parsed.database, databaseName); + ASSERT_EQUALS(StringData(parsed.body.firstElementFieldName()), commandName); + ASSERT_BSONOBJ_EQ(parsed.metadata, metadata); + ASSERT_BSONOBJ_EQ(parsed.body, commandArgs); } } // namespace |