Clover.NET coverage report - Coverage for s2container.net

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

File Stats: LOC: 102   Methods: 6
NCLOC: 68 Classes: 3
 
Source File Conditionals Statements Methods TOTAL
Seasar.Tests.Framework.Container\Factory\AspectTagHandlerTest.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.Reflection;
22   using System.IO;
23   using NUnit.Framework;
24   using Seasar.Framework.Container;
25   using Seasar.Framework.Container.Factory;
26   using log4net;
27   using log4net.Config;
28   using log4net.Util;
29  
30   namespace Seasar.Tests.Framework.Container.Factory
31   {
32   /// <summary>
33   /// AspectTagHandlerTest の概要の説明です。
34   /// </summary>
35   [TestFixture]
36   public class AspectTagHandlerTest
37   {
38   private const string PATH
39   = "Seasar/Tests/Framework/Container/Factory/AspectTagHandlerTest.dicon";
40  
41 1 [SetUp]
42   public void SetUp()
43   {
44 1 FileInfo info = new FileInfo(SystemInfo.AssemblyFileName(
45   Assembly.GetExecutingAssembly()) + ".config");
46 1 XmlConfigurator.Configure(LogManager.GetRepository(), info);
47   }
48  
49 1 [Test]
50   public void TestAspect()
51   {
52 1 IS2Container container = S2ContainerFactory.Create(PATH);
53  
54 1 IList list = (IList) container.GetComponent(typeof(IList));
55 1 int count = list.Count;
56  
57 1 IFoo foo = (IFoo) container.GetComponent(typeof(IFoo));
58 1 int time = foo.Time;
59 1 foo.ToString();
60 1 int hashCode = foo.GetHashCode();
61   }
62  
63   public interface IFoo
64   {
65   int Time { get; }
66   int GetHashCode();
67   string ToString();
68   }
69  
70   public class FooImpl : IFoo
71   {
72   private int time_ = 3;
73  
74 1 public FooImpl()
75   {
76   }
77  
78   #region IFoo メンバ
79  
80   public int Time
81   {
82 1 get
83   {
84 1 return time_;
85   }
86   }
87  
88 1 public override int GetHashCode()
89   {
90 1 return base.GetHashCode();
91   }
92  
93 1 public override string ToString()
94   {
95 1 return time_.ToString();
96   }
97  
98   #endregion
99   }
100   }
101   }
102