Clover.NET coverage report - Coverage for s2container.net

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

File Stats: LOC: 82   Methods: 4
NCLOC: 56 Classes: 2
 
Source File Conditionals Statements Methods TOTAL
Seasar.Tests.Framework.Container\Assembler\DefaultConstructorAssemblerTest.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.IO;
21   using System.Collections;
22   using System.Reflection;
23   using Seasar.Framework.Aop.Interceptors;
24   using Seasar.Framework.Container;
25   using Seasar.Framework.Container.Assembler;
26   using Seasar.Framework.Container.Impl;
27   using NUnit.Framework;
28   using log4net;
29   using log4net.Config;
30   using log4net.Util;
31  
32   using Seasar.Framework.Log;
33  
34   namespace Seasar.Tests.Framework.Container.Assembler
35   {
36  
37   /// <summary>
38   /// DefaultConstructorAssemblerTest の概要の説明です。
39   /// </summary>
40   [TestFixture]
41   public class DefaultConstructorAssemblerTest
42   {
43 2 [SetUp]
44   public void SetUp()
45   {
46 2 FileInfo info = new FileInfo(SystemInfo.AssemblyFileName(
47   Assembly.GetExecutingAssembly()) + ".config");
48 2 XmlConfigurator.Configure(LogManager.GetRepository(), info);
49   }
50  
51 1 [Test]
52   public void TestAssemble()
53   {
54 1 IS2Container container = new S2ContainerImpl();
55 1 ComponentDefImpl cd = new ComponentDefImpl(typeof(ArrayList));
56 1 container.Register(cd);
57 1 IConstructorAssembler assembler = new DefaultConstructorAssembler(cd);
58 1 Assert.IsNotNull(assembler.Assemble());
59   }
60  
61 1 [Test]
62   public void TestAssembleAspect()
63   {
64 1 IS2Container container = new S2ContainerImpl();
65 1 ComponentDefImpl cd = new ComponentDefImpl(typeof(A));
66 1 cd.AddAspeceDef(new AspectDefImpl(new TraceInterceptor()));
67 1 container.Register(cd);
68 1 IConstructorAssembler assembler = new DefaultConstructorAssembler(cd);
69 1 A a = (A) assembler.Assemble();
70 1 Console.WriteLine(a.Name);
71   }
72  
73   public class A : MarshalByRefObject
74   {
75   public string Name
76   {
77 1 get { return "A"; }
78   }
79   }
80   }
81   }
82