Clover.NET coverage report - Coverage for s2container.net

Coverage timestamp: 2006年5月30日 11:21:29

File Stats: LOC: 79   Methods: 6
NCLOC: 55 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Tests.Extension.DataSets\Impl\SqlTableReaderTest.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.Data;
20   using MbUnit.Framework;
21   using Seasar.Extension.DataSets.Impl;
22   using Seasar.Extension.Unit;
23   using Seasar.Framework.Util;
24  
25   namespace Seasar.Tests.Extension.DataSets.Impl
26   {
27   [TestFixture]
28   public class SqlTableReaderTest : S2TestCase
29   {
30   private const string PATH = "Ado.dicon";
31  
32 1 public void SetUpRead()
33   {
34 1 Include(PATH);
35   }
36  
37 1 [Test, S2(Seasar.Extension.Unit.Tx.Rollback)]
38   public void Read()
39   {
40 1 SqlTableReader reader = new SqlTableReader(DataSource);
41 1 reader.SetTable("emp");
42 1 DataTable ret = reader.Read();
43 1 DataTableInspector.OutWriteLine(ret);
44 1 Assert.AreEqual(14, ret.Rows.Count, "1");
45 1 Assert.AreEqual(DataRowState.Unchanged, ret.Rows[0].RowState, "2");
46   }
47  
48 1 public void SetUpRead2()
49   {
50 1 Include(PATH);
51   }
52  
53 1 [Test, S2(Seasar.Extension.Unit.Tx.Rollback)]
54   public void Read2()
55   {
56 1 SqlTableReader reader = new SqlTableReader(DataSource);
57 1 reader.SetTable("emp", "empno = 7788");
58 1 DataTable ret = reader.Read();
59 1 DataTableInspector.OutWriteLine(ret);
60 1 Assert.AreEqual(1, ret.Rows.Count, "1");
61   }
62  
63 1 public void SetUpRead3()
64   {
65 1 Include(PATH);
66   }
67  
68 1 [Test, S2(Seasar.Extension.Unit.Tx.Rollback)]
69   public void Read3()
70   {
71 1 SqlTableReader reader = new SqlTableReader(DataSource);
72 1 reader.SetSql("select * from emp", "emp");
73 1 DataTable ret = reader.Read();
74 1 DataTableInspector.OutWriteLine(ret);
75 1 Assert.AreEqual(14, ret.Rows.Count, "1");
76   }
77   }
78   }
79