示例#1
0
        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());
		}
示例#4
0
        public void GetUnderlyingPropertyInfoTest()
        {
            PropertyInfo      info         = this.BuildPropertyInfo();
            string            stubString   = "";
            NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(info, stubString);

            Assert.AreEqual(info, propertyInfo.GetUnderlyingPropertyInfo());
        }
示例#5
0
        public void ConstructorArgumentNullException2Test()
        {
            PropertyInfo info = typeof(string).GetProperty("Length", BindingFlags.Instance | BindingFlags.Public);

            Assert.IsNotNull(info);

            NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(info, null);
        }
示例#6
0
        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);
        }
示例#7
0
        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());
		}
示例#10
0
 public void ArgumentNullException2Test()
 {
     NuGenPropertyInfo propertyInfo = _properties[""];
 }
示例#11
0
 public void PropertyNotFoundExceptionTest()
 {
     NuGenPropertyInfo propertyInfo = _properties["PropertyNotExist"];
 }
示例#12
0
 public void ConstructorArgumentNullException2Test()
 {
     PropertyInfo      info         = this.BuildPropertyInfo();
     NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(info, null);
 }
示例#13
0
 public void ConstructorArgumentNullExceptionTest()
 {
     NuGenPropertyInfo propertyInfo = new NuGenPropertyInfo(null, new object());
 }