Clover Coverage Report - Commons BeanUtils 1.8.3-kuali-SNAPSHOT
Coverage timestamp: Thu Jun 9 2011 14:31:17 EDT
6   83   6   1
0   22   1   6
6     1  
1    
 
  CalendarConverterTestCase       Line # 27 6 0% 6 0 100% 1.0
 
  (11)
 
1    /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements. See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License. You may obtain a copy of the License at
8    *
9    * http://www.apache.org/licenses/LICENSE-2.0
10    *
11    * Unless required by applicable law or agreed to in writing, software
12    * distributed under the License is distributed on an "AS IS" BASIS,
13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    * See the License for the specific language governing permissions and
15    * limitations under the License.
16    */
17    package org.apache.commons.beanutils.converters;
18   
19    import java.util.Calendar;
20    import junit.framework.TestSuite;
21   
22    /**
23    * Test Case for the CalendarConverter class.
24    *
25    * @version $Revision: 471352 $
26    */
 
27    public class CalendarConverterTestCase extends DateConverterTestBase {
28   
29    /**
30    * Construct a new Calendar test case.
31    * @param name Test Name
32    */
 
33  11 toggle public CalendarConverterTestCase(String name) {
34  11 super(name);
35    }
36   
37    // ------------------------------------------------------------------------
38   
39    /**
40    * Create Test Suite
41    * @return test suite
42    */
 
43  1 toggle public static TestSuite suite() {
44  1 return new TestSuite(CalendarConverterTestCase.class);
45    }
46   
47    // ------------------------------------------------------------------------
48    /**
49    * Create the Converter with no default value.
50    * @return A new Converter
51    */
 
52  13 toggle protected DateTimeConverter makeConverter() {
53  13 return new CalendarConverter();
54    }
55   
56    /**
57    * Create the Converter with a default value.
58    * @param defaultValue The default value
59    * @return A new Converter
60    */
 
61  2 toggle protected DateTimeConverter makeConverter(Object defaultValue) {
62  2 return new CalendarConverter(defaultValue);
63    }
64   
65    /**
66    * Return the expected type
67    * @return The expected type
68    */
 
69  57 toggle protected Class getExpectedType() {
70  57 return Calendar.class;
71    }
72   
73    /**
74    * Convert from a java.util.Date to the Converter's type.
75    *
76    * @param value The Date value to convert
77    * @return The converted value
78    */
 
79  9 toggle protected Object toType(Calendar value) {
80  9 return value;
81    }
82   
83    }