Update tests to deal with GSSCommand objects now taking only the 'argument' part...
[gssweb.git] / json_gssapi / test / GSSPseudoRandomTest.cpp
index e38ab49..d28b8fd 100644 (file)
@@ -189,15 +189,12 @@ void GSSPseudoRandomTest::testConstructorWithJSONObject()
   GSSContext context( (gss_ctx_id_t)rand(), true );
   std::string key = GSSContextCache::instance()->store(context);
   
-  std::string input = "{\"method\": \"gss_pseudo_random\", \
-    \"arguments\": \
-    { \
+  std::string input = "{ \
          \"context_handle\": \"" + key + "\", \
          \"prf_key\": 1234567890, \
          \"prf_in\": \"mary had a little lamb\", \
          \"desired_output_len\": 256 \
-    }\
-  }";
+    }";
   json_error_t jsonErr;
   JSONObject json = JSONObject::load(input.c_str(), 0, &jsonErr);
   
@@ -267,27 +264,21 @@ void GSSPseudoRandomTest::testJSONMarshal()
 //   std::cout << "\nGSSWrap JSON: \n" << result->dump() << "\n";
   
   CPPUNIT_ASSERT_EQUAL_MESSAGE(
-    "The command name is incorrect",
-    std::string("gss_pseudo_random"),
-    std::string( (*result)["command"].string() )
-  );
-  
-  CPPUNIT_ASSERT_EQUAL_MESSAGE(
     "The return value was reported incorrectly",
     (int)MockPseudoRandom::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)MockPseudoRandom::minor_status,
-    (int)( (*result)["return_values"]["minor_status"].integer() )
+    (int)( (*result)["minor_status"].integer() )
   );
   
   CPPUNIT_ASSERT_EQUAL_MESSAGE(
     "The random bytes were reported incorrectly",
     MockPseudoRandom::outputMessageBuffer.toString(),
-    std::string( (*result)["return_values"]["random_bytes"].string() )
+    std::string( (*result)["random_bytes"].string() )
   );