public void ConstructorArgumentNullExceptionTest() { NuGenPropertyDescriptorCollection collection; try { collection = new NuGenPropertyDescriptorCollection( null, new object() ); Assert.Fail(); } catch (ArgumentNullException) { } try { collection = new NuGenPropertyDescriptorCollection( TypeDescriptor.GetProperties(new NuGenObjectDescriptorTests.DummyClass()), null ); Assert.Fail(); } catch (ArgumentNullException) { } }
public void IndexerPropertyNotFoundExceptionTest() { int foo = 0; NuGenPropertyDescriptorCollection collection = new NuGenPropertyDescriptorCollection( TypeDescriptor.GetProperties(foo), foo ); NuGenPropertyDescriptor descriptor = collection["SomePropertyThatDoesNotExist"]; }