Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: mobile/jndi/Test1.java


1   package mobile.jndi;
2   
3   import junit.framework.*;
4   import mobile.jmsapi.QueueConnectionFactory;
5   import mobile.jmsapi.TopicConnectionFactory;
6   import mobile.jmsapi.Queue;
7   import mobile.jmsapi.Topic;
8   
9   /**
10   * <p>Description: Tests serialization of requests in mobile.protocol and their
11   * construction i proxy.protocol</p>
12  
13   * @author Lukasz Pulawski
14  
15   */
16  
17  public class Test1
18      extends TestCase
19      implements mobile.bearer.http.Protocol {
20  
21  
22    /**
23     * The main method for this test.
24     * @param args array of arguments
25     */
26    public static void main(String[] args) {
27      junit.textui.TestRunner.run(suite());
28    }
29  
30    protected void setUp() {
31  
32    }
33  
34    /**
35     * Builds a new test suite for this test.
36     * @return test suit
37     */
38    public static Test suite() {
39      return new TestSuite(Test1.class);
40    }
41    public void testLookapTest()
42    {
43      QueueConnectionFactory qcf;
44      TopicConnectionFactory tcf;
45      Queue  q;
46      Topic  t;
47      Context cnx;
48  
49      cnx = new Context();
50      qcf = (QueueConnectionFactory) cnx.lookup("QCF");
51      tcf = (TopicConnectionFactory) cnx.lookup("TCF");
52      q = (Queue)cnx.lookup("SampleQueue");
53      t = (Topic)cnx.lookup("SampleTopic");
54  
55      assertNotNull(qcf);
56      assertNotNull(tcf);
57      assertNotNull(q);
58      assertNotNull(t);
59    }
60  }