public void PrivatePropertyTest() { NuGenInvoker invoker = new NuGenInvoker(new ParentClass()); NuGenPropertyInfo propInfo = invoker.Properties["PrivateProperty"]; Assert.IsNotNull(propInfo); }
public void ConstructorArgumentNullException2Test() { PropertyInfo info = typeof(string).GetProperty("Length", BindingFlags.Instance | BindingFlags.Public); Assert.IsNotNull(info); NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(info, null); }
public void GetUnderlyingPropertyInfoTest() { PropertyInfo info = this.BuildPropertyInfo(); string stubString = ""; NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(info, stubString); Assert.AreEqual(info, propertyInfo.GetUnderlyingPropertyInfo()); }
public void PropertyTest() { _invoker.Fields["_eventsClass"].Properties["Property"].SetValue(_fooValue); NuGenPropertyInfo propertyInfo = _invoker.Fields["_eventsClass"].Properties["Property"]; Int32 propertyValue = propertyInfo.GetValue <Int32>(); Object typeAgnosticPropertyValue = propertyInfo.GetValue(); Assert.AreEqual(_fooValue, propertyValue); Assert.AreEqual(_fooValue, typeAgnosticPropertyValue); }
public void FindPropertyTest() { NuGenPropertyInfo propertyInfo = _properties.FindProperty(null); Assert.IsNull(propertyInfo); propertyInfo = _properties.FindProperty("PropertyNotExist"); Assert.IsNull(propertyInfo); propertyInfo = _properties.FindProperty("Length"); Assert.IsNotNull(propertyInfo); }
public void ConstructorArgumentNullException2Test() { PropertyInfo info = this.BuildPropertyInfo(); NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(info, null); }
public void ConstructorArgumentNullExceptionTest() { NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(null, new object()); }
public void ArgumentNullException2Test() { NuGenPropertyInfo propertyInfo = _properties[""]; }
public void PropertyNotFoundExceptionTest() { NuGenPropertyInfo propertyInfo = _properties["PropertyNotExist"]; }