Coverage Report - org.mule.example.hello.NameString
 
Classes in this File Line Coverage Branch Coverage Complexity
NameString
0%
0/13
0%
0/4
1
 
 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.hello;
 8  
 
 9  
 import java.io.Serializable;
 10  
 
 11  
 /**
 12  
  * <code>NameString</code> is a simple string wrapper that holds a name and a greeting string
 13  
  */
 14  
 public class NameString implements Serializable
 15  
 {
 16  
     /**
 17  
      * Serial version
 18  
      */
 19  
     private static final long serialVersionUID = 7010138636008560022L;
 20  
 
 21  
     private String name;
 22  
     private String greeting;
 23  
 
 24  
     public NameString()
 25  0
     {
 26  0
         this.name = null;
 27  0
     }
 28  
     
 29  
     public NameString(String name)
 30  0
     {
 31  0
         this.name = name;
 32  0
     }
 33  
 
 34  
     /**
 35  
      * @return Returns the name.
 36  
      */
 37  
     public String getName()
 38  
     {
 39  0
         return name;
 40  
     }
 41  
 
 42  
     /**
 43  
      * @param name The name to set.
 44  
      */
 45  
     public void setName(String name)
 46  
     {
 47  0
         this.name = name;
 48  0
     }
 49  
 
 50  
     /**
 51  
      * @return Returns the greeting.
 52  
      */
 53  
     public String getGreeting()
 54  
     {
 55  0
         return greeting;
 56  
     }
 57  
 
 58  
     /**
 59  
      * @param greeting The greeting to set.
 60  
      */
 61  
     public void setGreeting(String greeting)
 62  
     {
 63  0
         this.greeting = greeting;
 64  0
     }
 65  
     
 66  
     public boolean isValid()
 67  
     {
 68  0
         return name != null && name.length() > 0;
 69  
     }
 70  
 }