Coverage Report - org.mule.tck.AbstractServiceAndFlowTestCase
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractServiceAndFlowTestCase
0%
0/14
0%
0/3
0
AbstractServiceAndFlowTestCase$1
0%
0/1
N/A
0
AbstractServiceAndFlowTestCase$ConfigVariant
0%
0/2
N/A
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.tck;
 8  
 
 9  
 import org.mule.tck.junit4.FunctionalTestCase;
 10  
 
 11  
 import org.junit.runner.RunWith;
 12  
 import org.junit.runners.Parameterized;
 13  
 
 14  
 @RunWith(Parameterized.class)
 15  
 public abstract class AbstractServiceAndFlowTestCase extends FunctionalTestCase
 16  
 {
 17  
     protected ConfigVariant variant;
 18  
     protected String configResources;
 19  
 
 20  
     public AbstractServiceAndFlowTestCase(ConfigVariant variant, String configResources)
 21  
     {
 22  0
         super();
 23  0
         this.variant = variant;
 24  0
         this.configResources = configResources;
 25  0
     }
 26  
 
 27  
     @Override
 28  
     protected void doSetUp() throws Exception
 29  
     {
 30  0
         super.doSetUp();
 31  
 
 32  0
         switch (variant)
 33  
         {
 34  
             case FLOW:
 35  0
                 doSetUpForFlow();
 36  0
                 break;
 37  
 
 38  
             case SERVICE:
 39  0
                 doSetUpForService();
 40  
                 break;
 41  
         }
 42  0
     }
 43  
 
 44  
     protected void doSetUpForFlow()
 45  
     {
 46  
         // subclasses can override this method with setup that is specific for the flow test variant
 47  0
     }
 48  
 
 49  
     protected void doSetUpForService()
 50  
     {
 51  
         // subclasses can override this method with setup that is specific for the service test variant
 52  0
     }
 53  
 
 54  
     @Override
 55  
     protected String getConfigResources()
 56  
     {
 57  0
         return configResources;
 58  
     }
 59  
 
 60  
     @Override
 61  
     protected String getTestHeader()
 62  
     {
 63  0
         return "Testing: " + name.getMethodName() + " (" + variant + ")";
 64  
     }
 65  
 
 66  0
     public static enum ConfigVariant
 67  
     {
 68  0
         FLOW, SERVICE
 69  
     }
 70  
 }