X-Git-Url: http://www.project-moonshot.org/gitweb/?p=gssweb.git;a=blobdiff_plain;f=json_gssapi%2Ftest%2FGSSUnwrapTest.cpp;h=de0d9a17910631360c3361d5421ffc3fad2b1a3c;hp=7b260087defd71f4cbec54b7271d684082d23227;hb=bfa71fbde9be079e765d189c98f2fb492c7546b2;hpb=5a2106f2202110de5548f4fa6ef031ef030fc8ac diff --git a/json_gssapi/test/GSSUnwrapTest.cpp b/json_gssapi/test/GSSUnwrapTest.cpp index 7b26008..de0d9a1 100644 --- a/json_gssapi/test/GSSUnwrapTest.cpp +++ b/json_gssapi/test/GSSUnwrapTest.cpp @@ -145,13 +145,10 @@ void GSSUnwrapTest::testConstructorWithJSONObject() /* Variables */ GSSContext context((gss_ctx_id_t)rand(), true); std::string key = GSSContextCache::instance()->store(context); - std::string input = "{\"method\": \"gss_wrap\", \ - \"arguments\": \ - { \ + std::string input = "{ \ \"context_handle\": \"" + key + "\", \ \"input_message\": \"mary had a little lamb\" \ - }\ - }"; + }"; json_error_t jsonErr; JSONObject json = JSONObject::load(input.c_str(), 0, &jsonErr); @@ -202,35 +199,29 @@ void GSSUnwrapTest::testJSONMarshal() result = cmd.toJSON(); // std::cout << "\nGSSUnwrap JSON: \n" << result->dump() << "\n"; - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "The command name is incorrect", - std::string("gss_wrap"), - std::string( (*result)["command"].string() ) - ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "The return value was reported incorrectly", (int)MockUnwrap::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)MockUnwrap::minor_status, - (int)( (*result)["return_values"]["minor_status"].integer() ) + (int)( (*result)["minor_status"].integer() ) ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "The output message was reported incorrectly", MockUnwrap::outputMessageBuffer.toString(), - std::string( (*result)["return_values"]["output_message"].string() ) + std::string( (*result)["output_message"].string() ) ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "The minor_status value was reported incorrectly", (int)qopState, - (int)( (*result)["return_values"]["qop_state"].integer() ) + (int)( (*result)["qop_state"].integer() ) );