User: cgjung  
  Date: 02/02/04 01:38:59

  Modified:    jboss.net/testsuite/src/main/org/jboss/test/net/hello
                        HelloUnitTestCase.java
  Log:
  Adapted to latest deployment changes. Compiles, but does not yet run yet.
  
  Revision  Changes    Path
  1.3       +26 -13    
contrib/jboss.net/testsuite/src/main/org/jboss/test/net/hello/HelloUnitTestCase.java
  
  Index: HelloUnitTestCase.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/contrib/jboss.net/testsuite/src/main/org/jboss/test/net/hello/HelloUnitTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HelloUnitTestCase.java    2001/10/16 15:53:03     1.2
  +++ HelloUnitTestCase.java    2002/02/04 09:38:59     1.3
  @@ -5,7 +5,7 @@
    * See terms of license at gnu.org.
    */
   
  -// $Id: HelloUnitTestCase.java,v 1.2 2001/10/16 15:53:03 cgjung Exp $
  +// $Id: HelloUnitTestCase.java,v 1.3 2002/02/04 09:38:59 cgjung Exp $
   
   package org.jboss.test.net.hello;
   
  @@ -27,50 +27,63 @@
    * Tests remote accessibility of stateless ejb bean
    * @created 5. Oktober 2001, 12:11
    * @author <a href="mailto:[EMAIL PROTECTED]";>Christoph G. Jung</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   
   public class HelloUnitTestCase extends AxisTestCase {
  -    
  -    // Constructors --------------------------------------------------
  +
  +   /** we use some password authentication to contact
  +    *  a security-aware bean
  +    */
  +   protected String LOGIN="jduke:theduke@";
  +
  +   /** has an associated secure end point that may be configured once */
  +   protected String SECURE_END_POINT=PROTOCOL+LOGIN+SERVICE_PORT;
  +
  +   // Constructors --------------------------------------------------
       public HelloUnitTestCase(String name) {
           super(name);
       }
  -    
  +
       /** the session bean with which we interact */
       Hello hello;
  -    
  +
       /** setup the bean */
       public void setUp() throws Exception {
           super.setUp();
           hello=(Hello) createAxisService(Hello.class,
  -        new URL(END_POINT));
  +        new URL(SECURE_END_POINT));
       }
  -    
  +
       /** where the config is stored */
       protected String getAxisConfiguration() {
           return "hello/client/"+super.getAxisConfiguration();
       }
  -    
  +
       /** test a simple hello world */
       public void testHello() throws Exception {
           assertEquals("Return value must be hello.",hello.hello("World"),"Hello 
World!");
       }
  -    
  +
       /** will be functional as soon as security is there! */
       public void testSayHello() throws Exception {
  -        assertEquals("Return value must be hello.",hello.sayHello(),"Hello!");
  +        assertEquals("Return value must be hello.","Hello jduke!",hello.sayHello());
       }
  -    
  +
       /** test some structural parameters */
       public void testHowdy() throws Exception {
           HelloData data=new HelloData();
           data.setName("CGJ");
           assertEquals("Return value must be howdy.",hello.howdy(data),"Howdy CGJ!");
       }
  -    
  +
       /** this is to deploy the whole ear */
       public static Test suite() throws Exception {
           return getJ2eeSetup(HelloUnitTestCase.class, "hello.ear");
       }
  +
  +    public static void main(String[] args) {
  +      junit.textui.TestRunner.run(HelloUnitTestCase.class);
  +    }
  +
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to