@Test
  public void testInstrument() throws Exception {
    final GrinderProperties properties = new GrinderProperties();
    final DCRContextImplementation context = DCRContextImplementation.create(null);

    final List<Instrumenter> instrumenters =
        new JythonScriptEngineService(properties, context, m_pyScript).createInstrumenters();

    assertEquals(1, instrumenters.size());

    final Instrumenter instrumenter = instrumenters.get(0);

    final Object foo = new Object();

    // instrument() is not supported by the traditional instrumenter.
    try {
      instrumenter.instrument(m_test, m_recorder, foo, null);
      fail("Expected NonInstrumentableTypeException");
    } catch (NonInstrumentableTypeException e) {
    }
  }
Beispiel #2
0
 /** {@inheritDoc} */
 @Override
 public void instrument(Object target, InstrumentationFilter filter)
     throws NonInstrumentableTypeException {
   m_instrumenter.instrument(getTest(), this, target, filter);
 }