public class TestArgumentsPanel extends TestCase { /** * Create a new test. * * @param name * the name of the test */ public TestArgumentsPanel(String name) { super(name); } /** * Test that adding an argument to the table results in an appropriate * TestElement being created. * * @throws Exception * if an exception occurred during the test */ public void testArgumentCreation() throws Exception { ArgumentsPanel gui = new ArgumentsPanel(); gui.tableModel.addRow(new Argument()); gui.tableModel.setValueAt("howdy", 0, 0); gui.tableModel.addRow(new Argument()); gui.tableModel.setValueAt("doody", 0, 1); assertEquals("=", ((Argument) ((Arguments) gui.createTestElement()).getArguments().get(0).getObjectValue()) .getMetaData());
public class PackageTest extends TestCase { /** * Create a new test. * * @param name * the name of the test */ public PackageTest(String name) { super(name); } /** * Test that adding an argument to the table results in an appropriate * TestElement being created. * * @throws Exception * if an exception occurred during the test */ public void testLDAPArgumentCreation() throws Exception { LDAPArgumentsPanel gui = new LDAPArgumentsPanel(); gui.tableModel.addRow(new LDAPArgument()); gui.tableModel.setValueAt("howdy", 0, 0); gui.tableModel.addRow(new LDAPArgument()); gui.tableModel.setValueAt("doody", 0, 1); assertEquals("=", ((LDAPArgument) ((LDAPArguments) gui.createTestElement()).getArguments().get(0) .getObjectValue()).getMetaData());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/config/gui/TestArgumentsPanel.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/ldap/config/gui/PackageTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class TestArgumentsPanel extends TestCase {
1
public class PackageTest extends TestCase {
2
		/**
2
		/**
3
		 * Create a new test.
3
		 * Create a new test.
4
		 * 
4
		 * 
5
		 * @param name
5
		 * @param name
6
		 *            the name of the test
6
		 *            the name of the test
7
		 */
7
		 */
8
		public TestArgumentsPanel(String name) {
8
		public PackageTest(String name) {
9
			super(name);
9
			super(name);
10
		}
10
		}
11
		/**
11
		/**
12
		 * Test that adding an argument to the table results in an appropriate
12
		 * Test that adding an argument to the table results in an appropriate
13
		 * TestElement being created.
13
		 * TestElement being created.
14
		 * 
14
		 * 
15
		 * @throws Exception
15
		 * @throws Exception
16
		 *             if an exception occurred during the test
16
		 *             if an exception occurred during the test
17
		 */
17
		 */
18
		public void testArgumentCreation() throws Exception {
18
		public void testLDAPArgumentCreation() throws Exception {
19
			ArgumentsPanel gui = new ArgumentsPanel();
19
			LDAPArgumentsPanel gui = new LDAPArgumentsPanel();
20
			gui.tableModel.addRow(new Argument());
20
			gui.tableModel.addRow(new LDAPArgument());
21
			gui.tableModel.setValueAt("howdy", 0, 0);
21
			gui.tableModel.setValueAt("howdy", 0, 0);
22
			gui.tableModel.addRow(new Argument());
22
			gui.tableModel.addRow(new LDAPArgument());
23
			gui.tableModel.setValueAt("doody", 0, 1);
23
			gui.tableModel.setValueAt("doody", 0, 1);
24
			assertEquals("=", ((Argument) ((Arguments) gui.createTestElement()).getArguments().get(0)
24
			assertEquals("=", ((LDAPArgument) ((LDAPArguments) gui.createTestElement()).getArguments().get(0)
25
.getObjectValue())
25
					.getObjectValue())
26
					.getMetaData());
26
.getMetaData());
27
		
27
		
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0