Coverage Report - com.lexicalscope.jewel.cli.specification.OptionSpecificationMatchers
 
Classes in this File Line Coverage Branch Coverage Complexity
OptionSpecificationMatchers
50%
1/2
N/A
1
OptionSpecificationMatchers$1
50%
2/4
50%
1/2
1
 
 1  
 //
 2  
 //Author       : t.wood
 3  
 //Copyright    : (c) Resilient Networks plc 2012 - All Rights Reserved
 4  
 //
 5  
 package com.lexicalscope.jewel.cli.specification;
 6  
 
 7  
 import org.hamcrest.Description;
 8  
 import org.hamcrest.Matcher;
 9  
 import org.hamcrest.TypeSafeMatcher;
 10  
 
 11  0
 public class OptionSpecificationMatchers
 12  
 {
 13  
    public static Matcher<ParsedOptionSpecification> mandatory()
 14  
    {
 15  226
       return new TypeSafeMatcher<ParsedOptionSpecification>(ParsedOptionSpecification.class)
 16  338
       {
 17  
          @Override
 18  
          public void describeTo(final Description description)
 19  
          {
 20  0
             description.appendText("mandatory option");
 21  0
          }
 22  
 
 23  
          @Override
 24  
          protected boolean matchesSafely(final ParsedOptionSpecification item)
 25  
          {
 26  112
             return !item.isOptional();
 27  
          }
 28  
       };
 29  
    }
 30  
 }