示例#1
0
        public void Ctor_Default()
        {
            var             attribute = new IDispatchConstantAttribute();
            DispatchWrapper wrapper   = Assert.IsType <DispatchWrapper>(attribute.Value);

            Assert.Null(wrapper.WrappedObject);
        }
        public void Ctor_Default()
        {
            var attribute = new IDispatchConstantAttribute();

#pragma warning disable 0618 // DispatchWrapper is marked as Obsolete.
            DispatchWrapper wrapper = Assert.IsType <DispatchWrapper>(attribute.Value);
#pragma warning restore 0618
            Assert.Null(wrapper.WrappedObject);
        }
示例#3
0
    // Test the IDispatchConstantAttribute class.
    public void TestIDispatchConstantAttribute()
    {
        IDispatchConstantAttribute attr;
        DispatchWrapper            wrapper;

        attr = new IDispatchConstantAttribute();
        AssertNotNull("DCA (1)", attr.Value);
        Assert("DCA (2)", (attr.Value is DispatchWrapper));
        wrapper = (DispatchWrapper)(attr.Value);
        AssertNull("DCA (3)", wrapper.WrappedObject);
    }
	// Test the IDispatchConstantAttribute class.
	public void TestIDispatchConstantAttribute()
			{
				IDispatchConstantAttribute attr;
				DispatchWrapper wrapper;

				attr = new IDispatchConstantAttribute();
				AssertNotNull("DCA (1)", attr.Value);
				Assert("DCA (2)", (attr.Value is DispatchWrapper));
				wrapper = (DispatchWrapper)(attr.Value);
				AssertNull("DCA (3)", wrapper.WrappedObject);
			}