Examples of Before


Examples of org.eweb4j.mvc.interceptor.Before

   * @throws Exception
   */
  private void excuteMethod(String methodName) throws Exception{

    /* 对于外部配置的前置拦截器,方法体内的前置拦截器较后执行  */
    Before before = method.getAnnotation(Before.class);
    if (before != null){
      InterExecution before_interExe = new InterExecution("before", context);
      before_interExe.execute(before.value());
      if (before_interExe.getError() != null){
        before_interExe.showErr();
        return ;
      }
    }
View Full Code Here

Examples of org.exoplatform.container.spi.Before

    * be found
    */
   protected void resolveNext(List<Interceptor> alreadyResolved, Iterator<Interceptor> iter, boolean resolveIfAbsent)
   {
      Interceptor it = iter.next();
      Before b = it.getClass().getAnnotation(Before.class);
      if (b != null)
      {
         // An annotation Before has been defined
         String id = b.value();
         if (id == null || (id = id.trim()).isEmpty())
         {
            // No id set
            if (PropertyManager.isDevelopping())
            {
View Full Code Here

Examples of org.exoplatform.container.spi.Before

    * be found
    */
   protected void resolveNext(List<Interceptor> alreadyResolved, Iterator<Interceptor> iter, boolean resolveIfAbsent)
   {
      Interceptor it = iter.next();
      Before b = it.getClass().getAnnotation(Before.class);
      if (b != null)
      {
         // An annotation Before has been defined
         String id = b.value();
         if (id == null || (id = id.trim()).isEmpty())
         {
            // No id set
            if (PropertyManager.isDevelopping())
            {
View Full Code Here

Examples of org.jboss.arquillian.spi.event.suite.Before

      Validate.notNull(testMethod, "TestMethod must be specified");
     
      TestContext testContext = contextLifecycle.createRestoreTestContext(testInstance);
      try
      {
         testContext.fire(new Before(testInstance, testMethod));
      }
      finally
      {
         activeContext.push(testContext);
      }
View Full Code Here

Examples of org.jboss.arquillian.spi.event.suite.Before

   {
      Validate.notNull(testInstance, "TestInstance must be specified");
      Validate.notNull(testMethod, "TestMethod must be specified");
     
      TestContext testContext = contextLifecycle.createRestoreTestContext(testInstance);
      testContext.fire(new Before(testInstance, testMethod));
      activeContext.push(testContext);
   }
View Full Code Here

Examples of org.jboss.arquillian.spi.event.suite.Before

      Validate.notNull(testMethod, "TestMethod must be specified");

      TestContext testContext = contextLifecycle.createRestoreTestContext(testInstance);
      try
      {
         testContext.fire(new Before(testInstance, testMethod));
      }
      finally
      {
         activeContext.push(testContext);
      }
View Full Code Here

Examples of org.jboss.arquillian.spi.event.suite.Before

   public void shouldCallAllEnrichers() throws Exception
   {
      Mockito.when(serviceLoader.all(TestEnricher.class)).thenReturn(Arrays.asList(enricher, enricher));
      bind(SuiteScoped.class, ServiceLoader.class, serviceLoader);
     
      fire(new Before(this, getClass().getMethod("shouldCallAllEnrichers")));
     
      Mockito.verify(enricher, Mockito.times(2)).enrich(this);
  
      assertEventFired(BeforeEnrichment.class, 1);
      assertEventFired(AfterEnrichment.class, 1);
View Full Code Here

Examples of org.jboss.arquillian.spi.event.suite.Before

      Mockito.when(container.getClassLoader()).thenReturn(cl);
     
      bind(SuiteScoped.class, ServiceLoader.class, serviceLoader);
      bind(SuiteScoped.class, Container.class, container);
     
      fire(new Before(this, getClass().getMethod("shouldCallAllEnrichers")));
     
      Mockito.verify(enricher, Mockito.times(2)).enrich(this);
     
      assertEventFired(BeforeEnrichment.class, 1);
      assertEventFired(AfterEnrichment.class, 1);
View Full Code Here

Examples of org.jboss.arquillian.spi.event.suite.Before

      Validate.notNull(testMethod, "TestMethod must be specified");
     
      TestContext testContext = contextLifecycle.createRestoreTestContext(testInstance);
      try
      {
         testContext.fire(new Before(testInstance, testMethod));
      }
      finally
      {
         activeContext.push(testContext);
      }
View Full Code Here

Examples of org.jboss.arquillian.test.spi.event.suite.Before

        assertEventFired(BeforeDroneConfigured.class, 2);
        assertEventFired(AfterDroneConfigured.class, 2);
        assertEventFired(BeforeDroneCallableCreated.class, 2);
        assertEventFired(AfterDroneCallableCreated.class, 2);

        fire(new Before(instance, testDummyMethod));

        assertEventFired(PrepareDrone.class, 2);
        assertEventFired(BeforeDroneConfigured.class, 2);
        assertEventFired(AfterDroneConfigured.class, 2);
        assertEventFired(BeforeDroneCallableCreated.class, 2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.