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); }
// 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); }