public void ConstructorArgumentNullException2Test()
		{
			FieldInfo info = typeof(int).GetField("MinValue");
			Assert.IsNotNull(info);

			NuGenFieldInfo fieldInfo = new NuGenFieldInfo(info, null);
		}
Exemplo n.º 2
0
        public void ConstructorArgumentNullException2Test()
        {
            FieldInfo info = typeof(int).GetField("MinValue");

            Assert.IsNotNull(info);

            NuGenFieldInfo fieldInfo = new NuGenFieldInfo(info, null);
        }
Exemplo n.º 3
0
        public void FieldAccessTest()
        {
            Int32 privateFieldValue = _invoker.Fields["_privateField"].GetValue <Int32>();

            Assert.AreEqual(_fooValue, privateFieldValue);

            ParentClass  parentClass = new ParentClass();
            NuGenInvoker invoker     = new NuGenInvoker(parentClass);

            NuGenFieldInfo privateFieldInfo = invoker.Fields["privateField"];

            Assert.IsNotNull(privateFieldInfo);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenPropertyGrid"/> class.
        /// </summary>
        /// <param name="serviceProvider">
        /// Provides:<para/>
        /// <see cref="INuGenControlStateService"/><para/>
        /// <see cref="INuGenPropertyGridRenderer"/><para/>
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
        /// </exception>
        public NuGenPropertyGrid(INuGenServiceProvider serviceProvider)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            _serviceProvider = serviceProvider;

            this.ToolStripRenderer = new ToolStripProfessionalRenderer(new NuGenVisualStudioColorTable());

            NuGenInvoker invoker = new NuGenInvoker(this);

            _doccomment = invoker.Fields["doccomment"];
            _doccomment.Events["Paint"].AddHandler(new PaintEventHandler(this.doccomment_Paint));
            _doccomment.Fields["m_labelDesc"].Properties["BackColor"].SetValue(Color.Transparent);
            _doccomment.Fields["m_labelTitle"].Properties["BackColor"].SetValue(Color.Transparent);
        }
		public void ConstructorArgumentNullExceptionTest()
		{
			NuGenFieldInfo fieldInfo = new NuGenFieldInfo(null, new object());
		}
Exemplo n.º 6
0
 public void ConstructorArgumentNullExceptionTest()
 {
     NuGenFieldInfo fieldInfo = new NuGenFieldInfo(null, new object());
 }
Exemplo n.º 7
0
 public void ArgumentNullException2Test()
 {
     NuGenFieldInfo fieldInfo = _fields[""];
 }
Exemplo n.º 8
0
 public void FieldNotFoundExceptionTest()
 {
     NuGenFieldInfo fieldInfo = _fields["MethodNotExist"];
 }
Exemplo n.º 9
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenPropertyGrid"/> class.
		/// </summary>
		/// <param name="serviceProvider">
		/// Provides:<para/>
		/// <see cref="INuGenControlStateService"/><para/>
		/// <see cref="INuGenPropertyGridRenderer"/><para/>
		/// </param>
		/// <exception cref="ArgumentNullException">
		/// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
		/// </exception>
		public NuGenPropertyGrid(INuGenServiceProvider serviceProvider)
		{
			if (serviceProvider == null)
			{
				throw new ArgumentNullException("serviceProvider");
			}

			_serviceProvider = serviceProvider;

			this.ToolStripRenderer = new ToolStripProfessionalRenderer(new NuGenVisualStudioColorTable());

			NuGenInvoker invoker = new NuGenInvoker(this);

			_doccomment = invoker.Fields["doccomment"];
			_doccomment.Events["Paint"].AddHandler(new PaintEventHandler(this.doccomment_Paint));
			_doccomment.Fields["m_labelDesc"].Properties["BackColor"].SetValue(Color.Transparent);
			_doccomment.Fields["m_labelTitle"].Properties["BackColor"].SetValue(Color.Transparent);
		}