Clover.NET coverage report - Coverage for s2dao.net

Coverage timestamp: 2006年5月30日 11:48:56

File Stats: LOC: 83   Methods: 5
NCLOC: 60 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Dao.Tests.Interceptors\S2DaoInterceptor2Test.cs - 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 S2DaoInterceptor2Test : S2TestCase
35   {
36   private IEmployeeAutoDao _dao = null;
37   private ILog _log= LogManager.GetLogger(typeof(S2DaoInterceptor2Test));
38  
39 1 public S2DaoInterceptor2Test()
40   {
41 1 FileInfo info = new FileInfo(SystemInfo.AssemblyShortName(
42   Assembly.GetExecutingAssembly()) + ".dll.config");
43 1 XmlConfigurator.Configure(LogManager.GetRepository(), info);
44   }
45  
46 1 [Test, S2(Tx.Rollback)]
47   public void TestInsert()
48   {
49 1 Employee emp = new Employee();
50 1 emp.Empno = 99;
51 1 emp.Ename = "hoge";
52 1 Assert.AreEqual(1, _dao.Insert(emp));
53   }
54  
55 1 [Test, S2()]
56   public void TestSelect()
57   {
58 1 Employee emp = _dao.GetEmployee(7788);
59 1 _log.Debug(emp);
60 1 Assert.AreEqual(7788, emp.Empno);
61   }
62  
63 1 [Test,S2]
64   public void TestSelectQuery()
65   {
66 1 IList employees = _dao.GetEmployeesBySal(0, 1000);
67 1 _log.Debug(employees);
68 1 Assert.AreEqual( 2, employees.Count);
69   }
70  
71 1 [Test, S2(Tx.Rollback)]
72   public void TestFullWidthTilda()
73   {
74 1 Employee emp = new Employee();
75 1 emp.Empno = 99;
76 1 emp.Ename = "~";
77 1 _dao.Insert(emp);
78 1 Employee emp2 = _dao.GetEmployee(99);
79 1 Assert.AreEqual(emp.Ename, emp2.Ename);
80   }
81   }
82   }
83