/**
   * returns all the capabilties of all
   *
   * @see Trigger assigned to class and method. The thrid parameter determines if just pre-trigger,
   *     post-trigger or all triggers shall be returned.
   * @param clss
   * @param method
   * @param type
   * @return all the capabilties of all
   * @see Trigger assigned to class and method.
   */
  public TriggerCapability getTriggerCapability(String clss, String method, TRIGGER_TYPE type) {

    LOG.logDebug("get trigger capability for: ", clss + '.' + method);

    TriggerCapability tc = null;
    TargetClass tgc = targetClasses.get(clss);
    if (tgc != null) {
      TargetMethod tm = tgc.getMethod(method);
      if (tm != null) {
        if (type.equals(TRIGGER_TYPE.PRE)) {
          tc = tm.getPreTrigger();
        } else {
          tc = tm.getPostTrigger();
        }
      }
    }
    return tc;
  }
Beispiel #2
0
 public static void main(String[] args) {
   TargetClass t = new TargetClass();
   t.print(false);
   t.print(true);
 }
 @Test(expected = AssertionError.class)
 public void testUnpureMethodCallingUnpureMethodInOtherClass() {
   target.unpureMethodCallingUnpureMethodInOtherClass(new OtherClass());
 }
 @Test
 public void testPureMethodCallingPureMethodInOtherClass() {
   target.pureMethodCallingPureMethodInOtherClass(new OtherClass());
 }
 @Test(expected = AssertionError.class)
 public void testUnpureMethodCallingOtherUnpureMethod() {
   target.unpureMethodCallingOtherUnpureMethod();
 }
 @Test
 public void testPureMethodCallingOtherPureMethod() {
   target.pureMethodCallingOtherPureMethod();
 }
 @Test(expected = AssertionError.class)
 public void testPureMethodWritingField() {
   target.unpureMethodWritingField();
 }
 @Test
 public void testPureMethodReadingField() {
   target.pureMethodReadingField();
 }
 @Test
 public void testPureMethod() {
   target.pureMethod();
 }