Clover Coverage Report - EasyMock 3.0
Coverage timestamp: sam. mai 8 2010 14:37:27 CEST
../../img/srcFileCovDistChart10.png 0% of files have more coverage
7   67   7   1
0   41   1   7
7     1  
1    
 
  LogicalOperator       Line # 24 7 0% 7 0 100% 1.0
 
  (2)
 
1    /**
2    * Copyright 2001-2010 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16   
17    package org.easymock;
18   
19    /**
20    * See {@link EasyMock#cmp}
21    *
22    * @author Henri Tremblay
23    */
 
24    public enum LogicalOperator {
25    LESS_THAN("<") {
 
26  10 toggle @Override
27    public boolean matchResult(final int result) {
28  10 return result < 0;
29    }
30    },
31    LESS_OR_EQUAL("<=") {
 
32  12 toggle @Override
33    public boolean matchResult(final int result) {
34  12 return result <= 0;
35    }
36    },
37    EQUAL("==") {
 
38  14 toggle @Override
39    public boolean matchResult(final int result) {
40  14 return result == 0;
41    }
42    },
43    GREATER_OR_EQUAL(">=") {
 
44  10 toggle @Override
45    public boolean matchResult(final int result) {
46  10 return result >= 0;
47    }
48    },
49    GREATER(">") {
 
50  12 toggle @Override
51    public boolean matchResult(final int result) {
52  12 return result > 0;
53    }
54    };
55   
56    private String symbol;
57   
 
58  10 toggle private LogicalOperator(final String symbol) {
59  10 this.symbol = symbol;
60    }
61   
 
62  32 toggle public String getSymbol() {
63  32 return symbol;
64    }
65   
66    public abstract boolean matchResult(int result);
67    }