X-Git-Url: http://www.project-moonshot.org/gitweb/?p=gssweb.git;a=blobdiff_plain;f=json_gssapi%2Ftest%2FGSSGetMicTest.cpp;h=1273761b9ba21bed410f98364ab8f8eeaa4706d4;hp=1875b36fc4d0dc0586842fd98d71defd0a83283d;hb=bfa71fbde9be079e765d189c98f2fb492c7546b2;hpb=5a2106f2202110de5548f4fa6ef031ef030fc8ac diff --git a/json_gssapi/test/GSSGetMicTest.cpp b/json_gssapi/test/GSSGetMicTest.cpp index 1875b36..1273761 100644 --- a/json_gssapi/test/GSSGetMicTest.cpp +++ b/json_gssapi/test/GSSGetMicTest.cpp @@ -135,14 +135,11 @@ void GSSGetMicTest::testConstructorWithJSONObject() GSSContext context((gss_ctx_id_t)rand(), true); std::string key = GSSContextCache::instance()->store(context); - std::string input = "{\"method\": \"gss_get_mic\", \ - \"arguments\": \ - { \ + std::string input = "{ \ \"context_handle\": \"" + key + "\", \ \"qop_req\": \"GSS_C_QOP_DEFAULT\", \ \"input_message\": \"mary had a little lamb\" \ - }\ - }"; + }"; json_error_t jsonErr; JSONObject json = JSONObject::load(input.c_str(), 0, &jsonErr); @@ -212,28 +209,21 @@ void GSSGetMicTest::testJSONMarshal() // std::cout << "\nGSSGetMic JSON: \n" << result->dump() << "\n"; CPPUNIT_ASSERT_EQUAL_MESSAGE( - "The command name is incorrect", - std::string("gss_get_mic"), - std::string( (*result)["command"].string() ) - ); - - - CPPUNIT_ASSERT_EQUAL_MESSAGE( "The return value was reported incorrectly", (int)MockGetMic::retVal, - (int)( (*result)["return_values"]["major_status"].integer() ) + (int)( (*result)["major_status"].integer() ) ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "The minor_status value was reported incorrectly", (int)MockGetMic::minor_status, - (int)( (*result)["return_values"]["minor_status"].integer() ) + (int)( (*result)["minor_status"].integer() ) ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "The output message was reported incorrectly", output, - std::string( (*result)["return_values"]["output_token"].string() ) + std::string( (*result)["output_token"].string() ) );