Clover.NET coverage report - Coverage

Coverage timestamp: Friday, May 20, 2005 9:17:00 PM

File Stats: LOC: 95   Methods: 5
NCLOC: 37 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
TypeHandlers\TimeSpanTypeHandler.cs - 0.0 % 0.0 % 0.0 %
coverage
1  
2   #region Apache Notice
3   /*****************************************************************************
4   * $Header: $
5   * $Revision: $
6   * $Date: $
7   *
8   * iBATIS.NET Data Mapper
9   * Copyright (C) 2004 - Gilles Bayon
10   *
11   *
12   * Licensed under the Apache License, Version 2.0 (the "License");
13   * you may not use this file except in compliance with the License.
14   * You may obtain a copy of the License at
15   *
16   * http://www.apache.org/licenses/LICENSE-2.0
17   *
18   * Unless required by applicable law or agreed to in writing, software
19   * distributed under the License is distributed on an "AS IS" BASIS,
20   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21   * See the License for the specific language governing permissions and
22   * limitations under the License.
23   *
24   ********************************************************************************/
25   #endregion
26  
27   #region Using
28  
29   using System;
30   using System.Data;
31   using System.Globalization;
32  
33   using IBatisNet.DataMapper.Configuration.ResultMapping;
34   #endregion
35  
36  
37  
38   namespace IBatisNet.DataMapper.TypeHandlers
39   {
40   /// <summary>
41   /// Description résumée de TimespanTypeHandler.
42   /// </summary>
43   internal class TimeSpanTypeHandler : BaseTypeHandler
44   {
45  
46   /// <summary>
47   ///
48   /// </summary>
49   /// <param name="mapping"></param>
50   /// <param name="dataReader"></param>
51   /// <returns></returns>
52 0 public override object GetValueByName(ResultProperty mapping, IDataReader dataReader)
53   {
54   //return GetValueByIndex(dataReader.GetOrdinal(columnName), dataReader);
55   return "ToDo";
56   }
57  
58   /// <summary>
59   ///
60   /// </summary>
61   /// <param name="mapping"></param>
62   /// <param name="dataReader"></param>
63   /// <returns></returns>
64 0 public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
65   {
66   // dépendra du dbType spécifié ds le ResultProperty (idem pour le StringTypeHandler
67   // des fois en DateTime, d'autre fois en TimeSpan
68   return "To do";
69   //dataReader.GetTimeSpan(columnIndex);
70   }
71  
72 0 public override object GetDataBaseValue(object outputValue, Type parameterType )
73   {
74   return new TimeSpan(Convert.ToInt64(outputValue));
75   }
76  
77 0 public override object ValueOf(Type type, string s)
78   {
79   return new TimeSpan(Convert.ToInt64(s));
80   }
81  
82   /// <summary>
83   ///
84   /// </summary>
85   /// <returns></returns>
86 0 public override bool IsSimpleType
87   {
88   get
89   {
90   return true;
91   }
92   }
93   }
94   }
95