01 /*
02 *
03 * Licensed to the Apache Software Foundation (ASF) under one
04 * or more contributor license agreements. See the NOTICE file
05 * distributed with this work for additional information
06 * regarding copyright ownership. The ASF licenses this file
07 * to you under the Apache License, Version 2.0 (the
08 * "License"); you may not use this file except in compliance
09 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.interop.testcases;
22
23 import org.apache.log4j.Logger;
24
25 import org.apache.qpid.test.framework.FrameworkBaseCase;
26
27 import java.util.Properties;
28
29 /**
30 * Coordinates test case 1, from the interop test specification. This test connects up the sender and receivers roles,
31 * and gets some dummy test reports from them, in order to check that the test framework itself is operational.
32 *
33 * <p><table id="crc"><caption>CRC Card</caption>
34 * <tr><th> Responsibilities <th> Collaborations
35 * <tr><td> Exercises the interop testing framework without actually sending any test messages.
36 * <td> {@link FrameworkBaseCase}
37 * </table>
38 */
39 public class InteropTestCase1DummyRun extends FrameworkBaseCase
40 {
41 /** Used for debugging. */
42 private static final Logger log = Logger.getLogger(InteropTestCase1DummyRun.class);
43
44 /**
45 * Creates a new coordinating test case with the specified name.
46 *
47 * @param name The test case name.
48 */
49 public InteropTestCase1DummyRun(String name)
50 {
51 super(name);
52 }
53
54 /**
55 * Performs the basic P2P test case, "Test Case 2" in the specification.
56 *
57 * @throws Exception Any exceptions are allowed to fall through and fail the test.
58 */
59 public void testDummyRun() throws Exception
60 {
61 log.debug("public void testDummyRun(): called");
62
63 Properties testConfig = new Properties();
64 testConfig.put("TEST_NAME", "TC1_DummyRun");
65
66 /*Message[] reports =*/ getCircuitFactory().sequenceTest(null, null, testConfig);
67
68 // Compare sender and receivers reports.
69 // Assert.assertEquals("Expected to get 2 dummy reports.", 2, reports.length);
70 }
71
72 /**
73 * Should provide a translation from the junit method name of a test to its test case name as defined in the
74 * interop testing specification. For example the method "testP2P" might map onto the interop test case name
75 * "TC2_BasicP2P".
76 *
77 * @param methodName The name of the JUnit test method.
78 * @return The name of the corresponding interop test case.
79 */
80 public String getTestCaseNameForTestMethod(String methodName)
81 {
82 return "TC1_DummyRun";
83 }
84 }
|