Ejemplo n.º 1
0
        public static void updateGroupTest(Client client, String gid)
        {
            // send the request to retrieve the group
            WebResponse response = client.retrieveGroup(gid);

            // verify the response code indicates success
            //int status =  response.getStatusCode();
            //assert(status == 200);

            // get the response stream to read the group
            Stream stream = response.GetResponseStream();

            // create a group deserializer
            XmlSerializer deserializer = new XmlSerializer(typeof(Group));

            // retrieve the returned group entry
            Group group = (Group)deserializer.Deserialize(stream);

            // update the group
            group.meta = new Meta();
            group.meta.version = "2.00";

            // send the request to update the group
            response = client.updateGroup(group);

            // verify the response code indicates success
            //status =  response.getStatusCode();
            //assert(status == 200);

            // get the response stream to read the group
            stream = response.GetResponseStream();

            // retrieve the returned user entry
            group = (Group)deserializer.Deserialize(stream);

            Console.WriteLine("updated group - " + group.id);
        }