Clover Coverage Report - jmxmonitor 1.0.2
Coverage timestamp: Wed Feb 10 2010 07:36:51 GMT
7   48   3   2.33
0   22   0.43   3
3     1  
1    
 
  RangeFunctionsTest       Line # 27 7 0% 3 0 100% 1.0
 
  (3)
 
1    /*
2    * Copyright 2010 Ben Gidley
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 uk.co.gidley.jmxmonitor.functions;
18   
19    import org.testng.annotations.Test;
20   
21    import static org.hamcrest.Matchers.is;
22    import static org.hamcrest.MatcherAssert.assertThat;
23   
24    /**
25    * Created by IntelliJ IDEA. User: ben Date: Jan 19, 2010 Time: 1:13:54 PM
26    */
 
27    public class RangeFunctionsTest {
28   
 
29  1 toggle @Test
30    public void testBetween(){
31  1 assertThat(RangeFunctions.isBetween(2,1,3), is(true));
32  1 assertThat(RangeFunctions.isBetween(1,1,3), is(false));
33  1 assertThat(RangeFunctions.isBetween(3,1,3), is(false));
34    }
35   
 
36  1 toggle @Test
37    public void testBelow(){
38  1 assertThat(RangeFunctions.isBelow(1,2), is(true));
39  1 assertThat(RangeFunctions.isBelow(2,2), is(false));
40    }
41   
 
42  1 toggle @Test
43    public void testAbove(){
44  1 assertThat(RangeFunctions.isAbove(2,2), is(false));
45  1 assertThat(RangeFunctions.isAbove(3,2), is(true));
46    }
47   
48    }