public void HaveParameter_OK_Null()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1, new Null <string>() });

            ((Action)(() => action.Should().HaveParameterN(1, null))).Should().NotThrow <XunitException>();
            ((Action)(() => action.Should().HaveNullParameterN(1))).Should().NotThrow <XunitException>();
        }
        public void HaveParameter_Fail_Null()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1, null });

            ((Action)(() => action.Should().HaveParameterN(0, null))).Should().Throw <XunitException>();
            ((Action)(() => action.Should().HaveNullParameterN(1))).Should().Throw <XunitException>();
        }
        public void HaveParameter_Fail_Value()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1, new Null <string>() });

            ((Action)(() => action.Should().HaveParameterN(0, "a"))).Should().Throw <XunitException>();
            ((Action)(() => action.Should().HaveParameterN(1, 10))).Should().Throw <XunitException>();
        }
        public void HaveParameter_OK_Value()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1, 2 });

            ((Action)(() => action.Should().HaveParameterN(0, 1))).Should().NotThrow <XunitException>();
            ((Action)(() => action.Should().HaveParameterN(1, 2))).Should().NotThrow <XunitException>();
        }
        private static Queue <CallAction> CreateXYZ()
        {
            Queue <CallAction> queue = new Queue <CallAction>();
            var action = CallAction.Construct(saveTo: "x");

            queue.Enqueue(action);
            action = CallAction.Construct(saveTo: "y");
            queue.Enqueue(action);
            action = CallAction.Construct(saveTo: "z");
            queue.Enqueue(action);
            return(queue);
        }
        public void CallStatic_Fail_WrongMethod()
        {
            CallAction action = CallAction.Construct(targetType: typeof(object), method: "Method1");

            ((Action)(() => action.Should().CallStatic <object>("Method"))).Should().Throw <XunitException>();
        }
        public void NotSaveTo_Fail()
        {
            CallAction action = CallAction.Construct(saveTo: "x");

            ((Action)(() => action.Should().NotSave())).Should().Throw <XunitException>();
        }
        public void SaveTo_FailNotSaving()
        {
            CallAction action = CallAction.Construct(saveTo: null);

            ((Action)(() => action.Should().SaveTo("y"))).Should().Throw <XunitException>();
        }
        public void SaveTo_FailWrongName()
        {
            CallAction action = CallAction.Construct(saveTo: "x");

            ((Action)(() => action.Should().SaveTo("y"))).Should().Throw <XunitException>();
        }
        public void HaveParameter_Fail_Variable_WrongType()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1, new Variable <int>("x") });

            ((Action)(() => action.Should().HaveVariableParameterN <string>(1, "x"))).Should().Throw <XunitException>();
        }
        public void HasNoParameters_OK()
        {
            CallAction action = CallAction.Construct();

            ((Action)(() => action.Should().HaveNoParameters())).Should().NotThrow <XunitException>();
        }
        public void HaveParameters_Fail_LessParams()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1, 2 });

            ((Action)(() => action.Should().HaveParametersCount(1))).Should().Throw <XunitException>();
        }
        public void SaveTo_OK()
        {
            CallAction action = CallAction.Construct(saveTo: "x");

            ((Action)(() => action.Should().SaveTo("x"))).Should().NotThrow <XunitException>();
        }
        public void HaveParameters_Fail_NoParams()
        {
            CallAction action = CallAction.Construct(parameters: null);

            ((Action)(() => action.Should().HaveParametersCount(1))).Should().Throw <XunitException>();
        }
        public void HasNoParameters_Fail()
        {
            CallAction action = CallAction.Construct(parameters: new object[] { 1 });

            ((Action)(() => action.Should().HaveNoParameters())).Should().Throw <XunitException>();
        }
        public void CallStatic_Fail_CallInstance()
        {
            CallAction action = CallAction.Construct(target: "x", method: "Method");

            ((Action)(() => action.Should().CallStatic <object>("Method"))).Should().Throw <XunitException>();
        }
        public void CallInstance_Fail_WrongTarget()
        {
            CallAction action = CallAction.Construct(target: "x", method: "Method");

            ((Action)(() => action.Should().CallInstance("y", "Method"))).Should().Throw <XunitException>();
        }
        public void CallStatic_Fail_CallStatic()
        {
            CallAction action = CallAction.Construct(targetType: typeof(object), method: "Method");

            ((Action)(() => action.Should().CallInstance("x", "Method"))).Should().Throw <XunitException>();
        }