Coverage Report - com.nilhcem.fakesmtp.server.SMTPAuthHandlerFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
SMTPAuthHandlerFactory
20%
1/5
N/A
1
 
 1  
 package com.nilhcem.fakesmtp.server;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.List;
 5  
 import org.subethamail.smtp.AuthenticationHandler;
 6  
 import org.subethamail.smtp.AuthenticationHandlerFactory;
 7  
 
 8  
 /**
 9  
  * The factory interface for creating authentication handlers.
 10  
  *
 11  
  * @author jasonpenny
 12  
  * @since 1.2
 13  
  */
 14  1
 /*package*/ final class SMTPAuthHandlerFactory implements AuthenticationHandlerFactory {
 15  
         private static final String LOGIN_MECHANISM = "LOGIN";
 16  
 
 17  
         @Override
 18  
         public AuthenticationHandler create() {
 19  0
                 return new SMTPAuthHandler();
 20  
         }
 21  
 
 22  
         @Override
 23  
         public List<String> getAuthenticationMechanisms() {
 24  0
                 List<String> result = new ArrayList<String>();
 25  0
                 result.add(SMTPAuthHandlerFactory.LOGIN_MECHANISM);
 26  0
                 return result;
 27  
         }
 28  
 }