0
|
1 using System;
|
|
2 using System.ComponentModel;
|
|
3
|
|
4 using BLToolkit.ComponentModel;
|
|
5
|
|
6 using NUnit.Framework;
|
|
7
|
|
8 namespace UnitTests.CS.ComponenetModel
|
|
9 {
|
|
10 [TestFixture]
|
|
11 public class ObjectBinderTest
|
|
12 {
|
|
13 [Test]
|
|
14 public void GetItemPropertiesTest()
|
|
15 {
|
|
16 ObjectBinder binder = new ObjectBinder();
|
|
17
|
|
18 binder.ListChanged += delegate(object sender, ListChangedEventArgs e)
|
|
19 {
|
|
20 PropertyDescriptorCollection properties = ((ITypedList)sender).GetItemProperties(null);
|
|
21
|
|
22 Assert.That(properties, Is.Not.Null);
|
|
23 Assert.That(properties, Is.Not.Empty);
|
|
24 };
|
|
25
|
|
26 binder.ItemType = typeof(string);
|
|
27 }
|
|
28 }
|
|
29 }
|