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