Clover.NET coverage report - Coverage for s2container.net

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

File Stats: LOC: 68   Methods: 3
NCLOC: 44 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Tests.Extension.DataSets\Impl\XlsWriterTest.cs 50.0% 100.0% 100.0% 91.7%
coverage 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 System.IO;
21   using System.Reflection;
22   using MbUnit.Framework;
23   using Seasar.Extension.DataSets;
24   using Seasar.Extension.DataSets.Impl;
25   using Seasar.Extension.Unit;
26   using Seasar.Framework.Util;
27  
28   namespace Seasar.Tests.Extension.DataSets.Impl
29   {
30   [TestFixture]
31   public class XlsWriterTest : S2TestCase
32   {
33   private const string PATH = "Seasar.Tests.Extension.DataSets.Impl.XlsReaderImplTest.xls";
34  
35   private string path2_;
36  
37   private DataSet dataSet_;
38  
39   private IDataWriter writer_;
40  
41 1 [SetUp]
42   public void SetUp()
43   {
44 1 using (Stream stream = ResourceUtil.GetResourceAsStream(PATH, Assembly.GetExecutingAssembly()))
45   {
46 1 dataSet_ = new XlsReader(stream).Read();
47   }
48 1 path2_ = Path.Combine(Path.GetTempPath(), "XlsWriterImplTest.xls");
49 1 writer_ = new XlsWriter(path2_);
50   }
51  
52 1 [TearDown]
53   public void TearDown()
54   {
55 1 if (File.Exists(path2_))
56   {
57 1 File.Delete(path2_);
58   }
59   }
60  
61 1 [Test]
62   public void TestWrite()
63   {
64 1 writer_.Write(dataSet_);
65   }
66   }
67   }
68