Mercurial > pub > bltoolkit
comparison UnitTests/CS/EditableObjects/InnerObjectTest.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
1 using System; | |
2 | |
3 using NUnit.Framework; | |
4 | |
5 using BLToolkit.EditableObjects; | |
6 using BLToolkit.Reflection; | |
7 using BLToolkit.TypeBuilder; | |
8 | |
9 namespace EditableObjects | |
10 { | |
11 [TestFixture] | |
12 public class InnerObjectTest | |
13 { | |
14 public abstract class TestClass : EditableObject | |
15 { | |
16 public abstract TestClass1 Test1 { get; set; } | |
17 } | |
18 | |
19 public abstract class TestClass1 : EditableObject | |
20 { | |
21 public TestClass1() {} | |
22 public TestClass1(InitContext ctx) : base() {} | |
23 | |
24 [NoInstance] | |
25 public abstract TestClass2 Test2 { get; set; } | |
26 } | |
27 | |
28 public abstract class TestClass2 : EditableObject | |
29 { | |
30 } | |
31 | |
32 [Test] | |
33 public void Test() | |
34 { | |
35 TestClass test = (TestClass)TypeAccessor.CreateInstance(typeof(TestClass)); | |
36 | |
37 Assert.IsNull(test.Test1.Test2); | |
38 } | |
39 } | |
40 } |