1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package net.grinder.scriptengine.jython.instrumentation.dcr;
23
24 import java.util.ArrayList;
25 import java.util.List;
26
27 import net.grinder.engine.common.EngineException;
28 import net.grinder.engine.process.dcr.DCRContextImplementation;
29 import net.grinder.scriptengine.CompositeInstrumenter;
30 import net.grinder.scriptengine.Instrumenter;
31 import net.grinder.scriptengine.java.JavaScriptEngineService;
32 import net.grinder.testutility.Jython21_22Runner;
33
34 import org.junit.Test;
35 import org.junit.runner.RunWith;
36
37
38
39
40
41
42
43 @RunWith(Jython21_22Runner.class)
44 public class TestJython22Instrumenter
45 extends AbstractJythonDCRInstrumenterTestCase {
46
47 private static Instrumenter createInstrumenter() throws EngineException {
48 final List<Instrumenter> instrumenters = new ArrayList<Instrumenter>();
49
50 instrumenters.add(
51 new Jython22Instrumenter(DCRContextImplementation.create(null)));
52
53 instrumenters.addAll(
54 new JavaScriptEngineService(DCRContextImplementation.create(null))
55 .createInstrumenters());
56
57 return new CompositeInstrumenter(instrumenters);
58 }
59
60 public TestJython22Instrumenter() throws Exception {
61 super(createInstrumenter());
62 }
63
64 @Test public void testVersion() throws Exception {
65 assertVersion("(2.1|2.2)");
66 }
67 }