Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out mangled method name parts.
Split out the parts of a mangled method name on construction so they can be provided as parameters for generating the sampler name.
- Loading branch information
Showing
5 changed files
with
66 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.jmibanez.tools.jmeter; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import junit.framework.TestCase; | ||
|
||
public class MethodCallRecordTest extends TestCase { | ||
|
||
public void testConstructSimpleMethodName() { | ||
String[] builtNames = MethodCallRecord.constructMethodName("foo", null); | ||
assertEquals("foo:", builtNames[0]); | ||
assertEquals("", builtNames[1]); | ||
} | ||
|
||
public void testConstructMethodNameWithOneArg() { | ||
String[] builtNames = MethodCallRecord | ||
.constructMethodName("foo", new Class<?>[] { String.class }); | ||
assertEquals("foo:java.lang.String", builtNames[0]); | ||
assertEquals("java.lang.String", builtNames[1]); | ||
} | ||
|
||
public void testConstructMethodNameWithSeveralArgs() { | ||
String[] builtNames = MethodCallRecord | ||
.constructMethodName("foo", new Class<?>[] { String.class, Class.class }); | ||
assertEquals("foo:java.lang.String,java.lang.Class", builtNames[0]); | ||
assertEquals("java.lang.String,java.lang.Class", builtNames[1]); | ||
} | ||
} |