1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace AspectSharp
.Lang
.Tests
.Types
18 using System
.Reflection
;
20 using AspectSharp
.Lang
.Steps
.Types
.Resolution
;
22 using NUnit
.Framework
;
25 /// Summary description for TypeManagerTestCase.
28 public class TypeManagerTestCase
31 public void InspectAppDomainAssemblies()
33 TypeManager manager
= new TypeManager();
34 manager
.InspectAppDomainAssemblies();
36 Type stringType
= manager
.ResolveType( "System.String" );
37 Assert
.AreEqual( typeof(String
), stringType
);
39 stringType
= manager
.ResolveType( "String" );
40 Assert
.AreEqual( typeof(String
), stringType
);
44 public void AddAssembly()
46 TypeManager manager
= new TypeManager();
47 manager
.AddAssembly( Assembly
.GetAssembly( typeof(TypeManagerTestCase
) ) );
49 Assert
.IsNull( manager
.ResolveType( "System.String" ) );
50 Assert
.AreEqual( typeof(TypeManagerTestCase
), manager
.ResolveType( "TypeManagerTestCase" ) );