Coverage Report - org.mule.example.loanbroker.esb.LoanBrokerApp
 
Classes in this File Line Coverage Branch Coverage Complexity
LoanBrokerApp
0%
0/17
0%
0/6
2.667
 
 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.example.loanbroker.esb;
 8  
 
 9  
 import org.mule.example.loanbroker.AbstractLoanBrokerApp;
 10  
 import org.mule.example.loanbroker.LocaleMessage;
 11  
 import org.mule.util.StringUtils;
 12  
 
 13  
 import java.io.IOException;
 14  
 
 15  
 /**
 16  
  * Runs the LoanBroker ESB example application.
 17  
  */
 18  
 
 19  
 public class LoanBrokerApp extends AbstractLoanBrokerApp
 20  
 {
 21  
     public LoanBrokerApp(String config) throws Exception
 22  
     {
 23  0
         super(config);
 24  0
     }
 25  
 
 26  
     public static void main(String[] args) throws Exception
 27  
     {
 28  0
         String config = getInteractiveConfig();
 29  0
         if (StringUtils.isNotEmpty(config))
 30  
         {
 31  0
             LoanBrokerApp loanBrokerApp = new LoanBrokerApp(config);
 32  0
             loanBrokerApp.run(false);
 33  
         }
 34  0
     }
 35  
 
 36  
     protected static String getInteractiveConfig() throws IOException
 37  
     {
 38  0
         int response = 0;
 39  
         
 40  0
         System.out.println("******************\n"
 41  
             + LocaleMessage.esbWelcome()
 42  
             + "\n******************");
 43  
         
 44  0
         while (response != 'q')
 45  
         {
 46  0
             response = readCharacter();
 47  0
             if (response == '1')
 48  
             {
 49  0
                 System.out.println(LocaleMessage.loadingEndpointEjb());
 50  0
                 return "loan-broker-esb-mule-config.xml";
 51  
             }
 52  
             else
 53  
             {
 54  0
                 System.out.println(LocaleMessage.loadingManagedEjb());
 55  0
                 return "loan-broker-esb-mule-config-with-ejb-container.xml";
 56  
             }
 57  
         }
 58  
         
 59  0
         return "";
 60  
     }
 61  
 }