Thanks for the hints.
After copied the jar file to the "current" directory where the "ant test" is 
running, now I got th following error:


  | calling_card_reg # ant test
  | Buildfile: build.xml
  | 
  | compile-test:
  | 
  | test:
  |     [junit] Testsuite: com.ip6networks.calling_card_registration.test.Client
  |     [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.012 sec
  |     [junit] 
  |     [junit] Testcase: warning(junit.framework.TestSuite$1):     FAILED
  |     [junit] No tests found in 
com.ip6networks.calling_card_registration.test.Client
  |     [junit] junit.framework.AssertionFailedError: No tests found in 
com.ip6networks.calling_card_registration.test.Client
  |     [junit] 
  |     [junit] 
  |     [junit] Test com.ip6networks.calling_card_registration.test.Client 
FAILED
  | 
  | BUILD SUCCESSFUL
  | Total time: 2 seconds
  | 

here is my Client.java source code:

  | # cat Client.java
  | package com.ip6networks.calling_card_registration.test;
  | 
  | import junit.framework.*;
  | import  com.ip6networks.calling_card_registration.test.Calculator;
  | import  com.ip6networks.calling_card_registration.test.CalculatorRemote;
  | import  com.ip6networks.calling_card_registration.test.ServiceLocator;
  | 
  | public class Client extends TestCase
  | {
  | /*
  |    public static void main(String[] args) throws Exception
  | */
  |    public void testCalculator() throws Exception
  |    {
  |       Calculator calculator = getSession();
  |       System.out.println("in Client class");
  |       System.out.println("1 + 1 = " + calculator.add(1, 1));
  |       System.out.println("1 - 1 = " + calculator.subtract(1, 1));
  | 
  |    }
  | 
  |       private static Calculator  getSession() throws Exception {
  | System.out.println("in getSession()");
  |              Calculator  mgr = null;
  |              mgr = (Calculator) 
ServiceLocator.getInstance().getService("Calculator");
  |                 if (mgr == null) {
  |                         //throw new SystemErrorException("Unable to connect 
to service");
  |                         throw new Exception("Unable to connect to service");
  |                 } else {
  |                         return mgr;
  |                 }
  |         }
  | }
  | 
  | 

Thanks
Sam

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245709#4245709

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245709
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to