Lance,

Looking good! This got rid of 5 of the 8 failures I reported earlier today. Now we're down to 3 TCK issues and one AXIS work item.

Prob1: fixed.

Prob2: amazingly, mysteriously, this is fixed!

Prob3: one of the two stub failures is fixed. The other still doesn't accept JAXRPCException: (See attached file: Client_getPropertyTest_from_standalone.jtr).

Prob4: the same issues exist here as existed on the Stub test:
1. We thought we had agreed that only properties that were in the spec's namespace (ie., javax.xml.rpc..) but not defined by the spec were considered invalid. The Stub test now does this (property name = Constants.INVALID_PROPERTY). The Call tests do not (property name = "UNSUPPORTED_QNAME-PROPERTY").
2. The spec says javax.xml.rpc.JAXRPCException should be thrown for invalid properties. The TCK expects IllegalArgumentException.
Here are the failure logs: (See attached file: Client_SetGetPropertyTest2_from_standalone.jtr)(See attached file: Client_RemovePropertyTest2_from_standalone.jtr).



Russell Butek
[EMAIL PROTECTED]

Please respond to Lance Andersen <[EMAIL PROTECTED]>

To: Russell Butek/Austin/[EMAIL PROTECTED]
cc:
Subject: Re: [Fwd: TCK Summary with new TCK]



Rusell,

Please give the attached jars a go... Please see the following comments:

Regards,
Lance


Prob1: getVarBoolean
====================

    Here is the updated tests for the getVarBoolean issue:
o jaxrpc/ee/w2j/rpc/encoded/marshalltest
o jaxrpc/ee/w2j/rpc/encoded/parametermodetest

Prob2: stale Client.class
=========================
The inheritedinterfacetest with the stale Client.class is puzzling to me.
This should have been taken care of via rebuild and rebundling. I
included the jar/war for this test anyway:

o jaxrpc/ee/j2w/inheritedinterfacetest

I will check with Release Engineering on this one.

Prob 3: setProperty of illegal properties (Stub)
================================================
For the stub setPropertyTest5 the test is okay for the invalid
properties being tested. The Client code has been modified to check for
RuntimeException since a JAXRPCException should be thrown in this case
which is a sub-class of RuntimeException according to the spec and
javadoc API's. The updated Client.class and Client.java file are included.

o jaxrpc/api/javax_xml_rpc/Stub/Client.class

There are 2 invalid test cases done:

invalidPropertyTest1
invalidPropertyTest2

invalidPropertyTest1 tests for setting of an invalid property. Before
the test use to test property name of "foo.bar". This rose an issue
from licensee as to how to determine what an invalid property name is.
After clarifying with spec lead for JAX-RPC the namespace prefix for
properties defined by JAX-RPC i.e. (javax.xml.rpc) is defined and owned
by the spec. So if you prepend the prefix to foo.bar as
(javax.xml.rpc.foo.bar) this will make the property illegal as defined
by the spec and subsequent throw of JAXRPCException. The TCK is modified
for this. Since the package namespace "javax.xml.rpc" is well known and
defined for JAX-RPC properties and all property values have this prefix
than "foo.bar" with this prefix is invalid.

invalidPropertyTest2 tests for null property which is always invalid.
Trying to set a property of a name that is null is invalid and the test
should expect JAXRPCException runtime exception.


Prob 4: setProperty of illegal properties (Call)
================================================
jaxrpc/api/javax_xml_rpc/Call/Client.java#GetSetPropertyTest1 could you
please clarify your problem/concern here.








/*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

/*
* @(#)Client.java 1.48 02/07/29
*/

package com.sun.ts.tests.jaxrpc.api.javax_xml_rpc.Stub;

import com.sun.ts.lib.util.*;
import com.sun.ts.lib.porting.*;
import com.sun.ts.lib.harness.*;

import java.io.*;
import java.net.*;
import java.util.*;
import java.rmi.*;

import javax.xml.rpc.*;
import javax.xml.namespace.QName;

import com.sun.javatest.Status;

import com.sun.ts.tests.jaxrpc.common.*;

public class Client extends ServiceEETest
{
    // The webserver defaults (overidden by harness properties)
    private static final String PROTOCOL = "http";
    private static final String HOSTNAME = "localhost";
    private static final int PORTNUM  = 8000;

    // The webserver host and port property names (harness properties)
    private static final String WEBSERVERHOSTPROP = "webServerHost";
    private static final String WEBSERVERPORTPROP = "webServerPort";

    // The webserver username and password property names (harness properties)
    private static final String USERNAME = "user";
    private static final String PASSWORD = "password";

    // Servlet URL's for negative test cases
    private static final String BADURL= Constants.BAD_RELATIVE_URL;

    // RPC service and port information
    private static final String NAMESPACE_URI = "http://helloservice.org/wsdl";
    private static final String SERVICE_NAME = "HelloService";
    private static final String PORT_NAME = "HelloPort";
    private QName SERVICE_QNAME;
    private QName PORT_QNAME;
    private static final Class PORT_CLASS = Hello.class;

    private TSURL ctsurl = new TSURL();
    private Properties props = null;
    private String hostname = HOSTNAME;
    private int portnum = PORTNUM;
    private String username = null;
    private String password = null;

    // URL properties used by the test
    private static final String ENDPOINT_URL = "stub.endpoint.1";
    private static final String WSDLLOC_URL = "stub.wsdlloc.1";
    private static final String SERVLET_URL = "stub.servlet.1";
    private String url = ""> private URL wsdlurl = null;
    private String testservleturl = null;
private void getTestURLs() throws Exception {
TestUtil.logMsg("Get JAXRPC porting instance");
TSJAXRPCInterface pi = JAXRPC_Util.getJAXRPCInstance();
TestUtil.logMsg("Get URL's used by the test");
String file = pi.getURLFromProp(ENDPOINT_URL);
url = "" hostname, portnum, file);
file = pi.getURLFromProp(WSDLLOC_URL);
wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file);
file = pi.getURLFromProp(SERVLET_URL);
testservleturl = ctsurl.getURLString(PROTOCOL, hostname, portnum, file);
TestUtil.logMsg("Service Endpoint URL: " + url);
TestUtil.logMsg("WSDL Location URL:    " + wsdlurl);
TestUtil.logMsg("Test Servlet URL:    " + testservleturl);
    }

    // Get Port and Stub access via porting layer interface
    Hello port = null;
    Stub stub = null;
private void getStub() throws Exception {
TestUtil.logMsg("Get stub from service implementation class"
+ " using JAXRPC porting instance");
port = (Hello) JAXRPC_Util.getStub(
    "com.sun.ts.tests.jaxrpc.api." +
    "javax_xml_rpc.Stub.HelloService", "getHelloPort");
TestUtil.logMsg("Cast stub to base Stub class ...");
stub = (javax.xml.rpc.Stub) port;
    }

    public static void main(String[] args)
    {
Client theTests = new Client();
Status s = theTests.run(args, System.out, System.err);
s.exit();
    }

/*  Test setup */
    /*
    *   @class.setup_props: webServerHost;
    *                       webServerPort;
    *                       user;
    *                       password;
    */

    public void setup(String[] args, Properties p) throws Fault
    {
props = p;
boolean pass = true;

// Initialize QNames used by the test
SERVICE_QNAME = new QName(NAMESPACE_URI, SERVICE_NAME);
PORT_QNAME = new QName(NAMESPACE_URI, PORT_NAME);
      try {
      hostname = p.getProperty(WEBSERVERHOSTPROP);
      if (hostname == null)
    pass = false;
    else if (hostname.equals(""))
    pass = false;
    try {
    portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP));
    } catch (Exception e) {
    pass = false;
    }
    getTestURLs();
    username = p.getProperty(USERNAME);
    password = p.getProperty(PASSWORD);
    TestUtil.logMsg("Creating stub instance ...");
    getStub();
      } catch (Exception e) {
      throw new Fault("setup failed:", e);
    }
    if (!pass) {
      TestUtil.logErr("Please specify host & port of web server " +
      "in config properties: " + WEBSERVERHOSTPROP +
      ", " + WEBSERVERPORTPROP);
    throw new Fault("setup failed:");
    }
    logMsg("setup ok");
    }

    public void cleanup()  throws Fault {
    logMsg("cleanup ok");
    }

    /*
    *   @testName:  getPropertyNamesTest1
    *
    *   @assertion_ids: JAXRPC:JAVADOC:28; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface, get the configurable properties for the
    * stub class.
    */
public void getPropertyNamesTest1() throws Fault {
TestUtil.logTrace("getPropertyNamesTest1");
boolean pass = true;
Iterator iterator = null;
      try {
      TestUtil.logMsg("Get of target endpoint ...");
      try {
    iterator = stub._getPropertyNames();
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    return;
      }
      if (!iterator.hasNext()) {
    TestUtil.logMsg("Stub has no configurable properties ...");
    }
    else {
    TestUtil.logMsg("Stub has the following configurable properties ...");
    int i=1;
    while (iterator.hasNext()) {
    TestUtil.logMsg("Property"+ i++ +" = "+iterator.next());
    }
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      throw new Fault("getPropertyNamesTest1 failed", e);
      }
if (!pass)
throw new Fault("getPropertyNamesTest1 failed");
    }

    /*
    *   @testName:  setPropertyTest1
    *
    *   @assertion_ids: JAXRPC:JAVADOC:24; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface, set the endpoint address property for Stub,
    * and verify endpoint address is set correctly.
    */
public void setPropertyTest1() throws Fault {
TestUtil.logTrace("setPropertyTest1");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting endpoint address to " + url + " ...");
      try {
    stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    return;
      }
      TestUtil.logMsg("Verify correct setting of endpoint address ...");
      String rec =
    (String) stub._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY);
    if (!url.equals(rec)) {
    TestUtil.logErr("endpoint address not set correctly: " +
    "expected " + url + ", received " + rec);
    pass = false;
    }
    else {
    TestUtil.logMsg("endpoint address set correctly to " + url);
    }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      throw new Fault("setPropertyTest1 failed", e);
        }
if (!pass)
throw new Fault("setPropertyTest1 failed");
    }

    /*
    *   @testName:  setPropertyTest2
    *
    *   @assertion_ids: JAXRPC:JAVADOC:22; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface, set the username for authentication
    *                  for the Stub, and verify username is set correctly.
    */
public void setPropertyTest2() throws Fault {
TestUtil.logTrace("setPropertyTest2");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting username to " + username + " ...");
      try {
    stub._setProperty(Stub.USERNAME_PROPERTY, username);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    return;
      }
      TestUtil.logMsg("Verify correct setting of username ...");
      String rec =
    (String) stub._getProperty(Stub.USERNAME_PROPERTY);
    if (!username.equals(rec)) {
    TestUtil.logErr("username not set correctly: " +
    "expected " + username + ", received " + rec);
    pass = false;
    }
    else {
    TestUtil.logMsg("username set correctly to " + username);
    }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      throw new Fault("setPropertyTest2 failed", e);
        }
if (!pass)
throw new Fault("setPropertyTest2 failed");
    }

    /*
    *   @testName:  setPropertyTest3
    *
    *   @assertion_ids: JAXRPC:JAVADOC:23; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface, set the password for authentication
    *                  for the Stub, and verify password is set correctly.
    */
public void setPropertyTest3() throws Fault {
TestUtil.logTrace("setPropertyTest3");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting password to " + password + " ...");
      try {
    stub._setProperty(Stub.PASSWORD_PROPERTY, password);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    return;
      }
      TestUtil.logMsg("Verify correct setting of property ...");
      String rec =
    (String) stub._getProperty(Stub.PASSWORD_PROPERTY);
    if (!password.equals(rec)) {
    TestUtil.logErr("password not set correctly: " +
    "expected " + password + ", received " + rec);
    pass = false;
    }
    else {
    TestUtil.logMsg("password set correctly to " + password);
    }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      throw new Fault("setPropertyTest3 failed", e);
        }
if (!pass)
throw new Fault("setPropertyTest3 failed");
    }

    /*
    *   @testName:  setPropertyTest4
    *
    *   @assertion_ids: JAXRPC:JAVADOC:25; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface, set the session maintain property
    *                  for the Stub, and verify it is set correctly.
    */
public void setPropertyTest4() throws Fault {
TestUtil.logTrace("setPropertyTest4");
boolean pass = true;
Boolean v = new Boolean("true");
      try {
      TestUtil.logMsg("Setting session maintain property to true ...");
      try {
    stub._setProperty(Stub.SESSION_MAINTAIN_PROPERTY, v);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    return;
      }
      TestUtil.logMsg("Verify correct setting of property ...");
      Boolean rec =
    (Boolean) stub._getProperty(Stub.SESSION_MAINTAIN_PROPERTY);
    if (!v.equals(rec)) {
    TestUtil.logErr("session maintain not set correctly: " +
    "expected " + v + ", received " + rec);
    pass = false;
    }
    else {
    TestUtil.logMsg("session maintain set correctly to " + v);
    }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      throw new Fault("setPropertyTest4 failed", e);
        }
if (!pass)
throw new Fault("setPropertyTest4 failed");
    }

    /*
    *   @testName:  setPropertyTest5
    *
    *   @assertion_ids: JAXRPC:JAVADOC:26; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface. Set valid and invalid properties for
    *                  the Stub. Verify invalid properties are not set.
    */
public void setPropertyTest5() throws Fault {
TestUtil.logTrace("setPropertyTest5");
boolean pass = true;

if (!invalidPropertyTest1()) pass = false;
if (!invalidPropertyTest2()) pass = false;

if (!pass)
throw new Fault("setPropertyTest5 failed");
    }

    /*
    *   @testName:  setPropertyTest6
    *
    *   @assertion_ids: JAXRPC:JAVADOC:26; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318; JAXRPC:SPEC:335; JAXRPC:SPEC:336;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface. Set properties for the Stub with valid
    *                  and invalid stub configuration errors.
    *                  Verify stub configuration errors are detected at
    *                  runtime. This test sets a proper URL, a bad URL,
    *                  a proper URL to an incorrect endpoint.
    */
public void setPropertyTest6() throws Fault {
TestUtil.logTrace("setPropertyTest6");
boolean pass = true;

if (!invokeRPCMethodPositiveTest()) pass = false;
if (!invokeRPCMethodNegativeTest1()) pass = false;
if (!invokeRPCMethodNegativeTest2()) pass = false;

if (!pass)
throw new Fault("setPropertyTest6 failed");
    }

    /*
    *   @testName:  getPropertyTest
    *
    *   @assertion_ids: JAXRPC:JAVADOC:27; JAXRPC:SPEC:312; JAXRPC:SPEC:314;
    *                   JAXRPC:SPEC:318;
    *
    *   @test_Strategy: Create a stub instance to our service definition
    * interface. Get valid and invalid properties for
    *                  the Stub. Verify only valid properties are received.
    */
public void getPropertyTest() throws Fault {
TestUtil.logTrace("getPropertyTest");
boolean pass = true;

if (!getPropertyPositiveTest()) pass = false;
if (!getPropertyNegativeTest1()) pass = false;
if (!getPropertyNegativeTest2()) pass = false;

if (!pass)
throw new Fault("getPropertyTest failed");
    }
private boolean getPropertyPositiveTest() {
TestUtil.logTrace("getPropertyPositiveTest");
boolean pass = true;
Object p = null;
String s = null;
      try {
      TestUtil.logMsg("Get of endpoint address ...");
      try {
    p = stub._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    }
    if (p != null) {
    TestUtil.logMsg("endpoint address received, value is: " + p);
    }
    else {
    TestUtil.logMsg("endpoint address received, value is: null");
    }
    TestUtil.logMsg("Set/Get of endpoint address ...");
    try {
    stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url);
    s = (String) stub._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY);
      }
      catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    }
    if (!s.equals(url)) {
    TestUtil.logErr("endpoint address not received correctly: " +
    "expected " + url + ", received " + s);
    pass = false;
    }
    else {
    TestUtil.logMsg("endpoint address received correctly");
    }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
}
printTestStatus(pass, "getPropertyPositiveTest2");
return pass;
    }
private boolean getPropertyNegativeTest1() {
TestUtil.logTrace("getPropertyNegativeTest1");
boolean pass = true;
Object p = null;
      try {
      TestUtil.logMsg("Get of invalid property ...");
      try {
    p = stub._getProperty(Constants.INVALID_PROPERTY);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    }
    catch (IllegalArgumentException e) {
    TestUtil.logMsg("IllegalArgumentException as expected ...");
    }
    catch (Exception e) {
    TestUtil.logErr("Unexpected Exception ... " + e);
    pass = false;
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "getPropertyNegativeTest1");
return pass;
    }
private boolean getPropertyNegativeTest2() {
TestUtil.logTrace("getPropertyNegativeTest2");
boolean pass = true;
Object p = null;
      try {
      TestUtil.logMsg("Get of invalid property ...");
      try {
    p = stub._getProperty(Constants.NULL_PROPERTY);
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    }
    catch (IllegalArgumentException e) {
    TestUtil.logMsg("IllegalArgumentException as expected ...");
    }
    catch (Exception e) {
    TestUtil.logErr("Unexpected Exception ... " + e);
    pass = false;
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "getPropertyNegativeTest2");
return pass;
    }
private boolean invokeRPCMethodPositiveTest() {
TestUtil.logTrace("invokeRPCMethodPositiveTest");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting target endpoint to " + url + " ...");
      stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url);
      TestUtil.logMsg("Invoking RPC method hello(\"foo\") and expect " +
      "'Hello, foo!' ...");
      String response = port.hello("foo");
      if (!response.equals("Hello, foo!")) {
    TestUtil.logErr("RPC failed - expected \"Hello, foo!\", received: " + response);
    pass = false;
      }
      else {
    TestUtil.logMsg("RPC passed - received expected response: " +
    response);
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "invokeRPCMethodPositiveTest1");
return pass;
    }
private boolean invokeRPCMethodNegativeTest1() {
TestUtil.logTrace("invokeRPCMethodNegativeTest1");
boolean pass = true;
      try {
      url = "" hostname, portnum, BADURL);
      TestUtil.logMsg("Setting target endpoint to " + url + " ...");
      stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url);
      TestUtil.logMsg("Invoking RPC method on an invalid target endpoint");
      try {
    String response = port.hello("foo");
    TestUtil.logErr("Exception did not occur - unexpected");
    pass = false;
      }
      catch (Exception e) {
    TestUtil.logMsg("Exception did occur - expected");
    TestUtil.logMsg("Exception was: " + e);
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "invokeRPCMethodNegativeTest1");
return pass;
    }
private boolean invokeRPCMethodNegativeTest2() {
TestUtil.logTrace("invokeRPCMethodNegativeTest2");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting target endpoint to " + testservleturl + " ...");
      stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, testservleturl);
      TestUtil.logMsg("Invoking RPC method on an valid target endpoint that does not process SOAP messages");
      try {
    String response = port.hello("foo");
    TestUtil.logErr("Exception did not occur - unexpected");
    pass = false;
      }
      catch (Exception e) {
    TestUtil.logMsg("Exception did occur - expected");
    TestUtil.logMsg("Exception was: " + e);
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "invokeRPCMethodNegativeTest2");
return pass;
    }
private boolean invalidPropertyTest1() {
TestUtil.logTrace("invalidPropertyTest1");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting invalid property " + Constants.INVALID_PROPERTY + " ...");
      try {
    stub._setProperty(Constants.INVALID_PROPERTY, new Object());
    TestUtil.logErr("No exception ... unexpected");
    pass = false;
    }
    catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    }
    catch (RuntimeException e) {
    TestUtil.logMsg("RuntimeException caught as expected ...");
    }
    catch (Exception e) {
    TestUtil.logErr("Unexpected Exception ... " + e);
    pass = false;
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "invalidPropertyTest1");
return pass;
    }
private boolean invalidPropertyTest2() {
TestUtil.logTrace("invalidPropertyTest2");
boolean pass = true;
      try {
      TestUtil.logMsg("Setting invalid property - null ...");
      try {
    stub._setProperty(Constants.NULL_PROPERTY, new Object());
    TestUtil.logErr("No exception ... unexpected");
    pass = false;
      }
      catch (UnsupportedOperationException e) {
    TestUtil.logMsg("Unsupported Operation ... no further testing");
    }
    catch (RuntimeException e) {
    TestUtil.logMsg("RuntimeException caught as expected ...");
    }
    catch (Exception e) {
    TestUtil.logErr("Unexpected Exception ... " + e);
    pass = false;
      }
      } catch (Exception e) {
      TestUtil.logErr("Caught exception: " + e.getMessage());
      TestUtil.printStackTrace(e);
      pass = false;
      }
printTestStatus(pass, "invalidPropertyTest2");
return pass;
    }
private boolean printTestStatus(boolean pass, String test) {
if (pass)
TestUtil.logMsg("" + test + " ... PASSED");
else
      TestUtil.logErr("" + test + " ... FAILED");
return pass;
}
}


Attachment: Client_getPropertyTest_from_standalone.jtr
Description: Binary data

Attachment: Client_SetGetPropertyTest2_from_standalone.jtr
Description: Binary data

Attachment: Client_RemovePropertyTest2_from_standalone.jtr
Description: Binary data

Reply via email to