Clover.NET coverage report - Coverage for s2dao.net

Coverage timestamp: 2006年5月18日 15:09:15

File Stats: LOC: 89   Methods: 6
NCLOC: 63 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Dao.Tests.Interceptors\S2DaoInterceptorTest.cs 100.0% 100.0% 100.0% 100.0%
coverage
1   #region Copyright
2   /*
3   * Copyright 2005 the Seasar Foundation and the Others.
4   *
5   * Licensed under the Apache License, Version 2.0 (the "License");
6   * you may not use this file except in compliance with the License.
7   * 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,
14   * either express or implied. See the License for the specific language
15   * governing permissions and limitations under the License.
16   */
17   #endregion
18  
19   using System;
20   using System.Collections;
21   using System.IO;
22   using System.Reflection;
23   using Seasar.Framework.Container;
24   using Seasar.Framework.Container.Factory;
25   using Seasar.Extension.Unit;
26   using MbUnit.Framework;
27   using log4net;
28   using log4net.Config;
29   using log4net.Util;
30  
31   namespace Seasar.Dao.Tests.Interceptors
32   {
33   [TestFixture]
34   public class S2DaoInterceptorTest : S2TestCase
35   {
36  
37   private const string PATH = "Seasar.Dao.Tests.Interceptors/IEmployeeDao.dicon";
38   private IEmployeeDao _employeeDao = null;
39   private ILog _log= LogManager.GetLogger(typeof(S2DaoInterceptorTest));
40  
41 1 public S2DaoInterceptorTest()
42   {
43 1 FileInfo info = new FileInfo(SystemInfo.AssemblyShortName(
44   Assembly.GetExecutingAssembly()) + ".dll.config");
45 1 XmlConfigurator.Configure(LogManager.GetRepository(), info);
46   }
47  
48 1 [Test, S2()]
49   public void TestSelectBeanList()
50   {
51 1 IList employees = _employeeDao.GetAllEmployees();
52 15 for (int i = 0; i < employees.Count; ++i) {
53 14 _log.Debug(employees[i].ToString());
54   }
55 1 Assert.AreEqual(true, employees.Count > 0, "1");
56   }
57  
58 1 [Test, S2()]
59   public void TestSelectBean()
60   {
61 1 Employee employee = _employeeDao.GetEmployee(7788);
62 1 _log.Debug(employee.ToString());
63 1 Assert.AreEqual("SCOTT", employee.Ename, "1");
64   }
65  
66 1 [Test, S2()]
67   public void TestSelectObject()
68   {
69 1 int count = _employeeDao.GetCount();
70 1 _log.Debug("count:" + count);
71 1 Assert.AreEqual(true, count > 0, "1");
72   }
73  
74 1 [Test, S2(Tx.Rollback)]
75   public void TestUpdate()
76   {
77 1 Employee employee = _employeeDao.GetEmployee(7788);
78 1 Assert.AreEqual(1, _employeeDao.Update(employee), "1");
79   }
80  
81 1 [Test, S2(Tx.Rollback)]
82   public void TestInsert()
83   {
84 1 Assert.AreEqual(1, _employeeDao.Insert(9999, "hoge"));
85   }
86  
87   }
88   }
89