public void TestWithParameterNull()
        {
            _attribute.ParameterName = "ThisObject";
            TestFunctionWithThisObject function = new TestFunctionWithThisObject(null, null);

            WxeDemandMethodPermissionAttributeHelper helper = new WxeDemandMethodPermissionAttributeHelper(
                function.GetType(),
                _attribute);

            helper.GetSecurableObject(function);
        }
        public void TestWithDefaultParameter()
        {
            TestFunctionWithThisObject function = new TestFunctionWithThisObject(_securableObject, null);

            function.ThisObject = _securableObject; // Required because in this test the WxeFunction has not started executing.

            _attribute.ParameterName = null;

            WxeDemandMethodPermissionAttributeHelper helper = new WxeDemandMethodPermissionAttributeHelper(
                function.GetType(),
                _attribute);

            Assert.That(helper.GetSecurableObject(function), Is.SameAs(function.ThisObject));
        }