Esempio n. 1
0
        public void ActWithFourInputsAndReturnType_ActActionWithoutException_ActedInstanceReturned()
        {
            var arranged = new Arranged <string, int, double, decimal>("input", 1, 2.0, 3m);

            var result = arranged.Act((input, param1, param2, param3) => 1);

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Acted <int>));
        }
Esempio n. 2
0
        public void Act_ActActionWithoutException_ActedInstanceReturned()
        {
            var arranged = new Arranged();

            var result = arranged.Act(() => { });

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Acted));
        }
Esempio n. 3
0
        public void ActWithThreeInputs_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged <string, int, double>("input", 1, 2.0);
            var called   = false;

            arranged.Act((input, param1, param2) => called = true);

            Assert.IsTrue(called);
        }
Esempio n. 4
0
        public void ActWithFourInputs_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged <string, int, double, decimal>("input", 1, 2.0, 3m);
            var called   = false;

            arranged.Act((input, param1, param2, param3) => called = true);

            Assert.IsTrue(called);
        }
Esempio n. 5
0
        public void ActWithTwoInputs_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged <string, int>("input", 1);
            var called   = false;

            arranged.Act((input, parameter) => called = true);

            Assert.IsTrue(called);
        }
Esempio n. 6
0
        public void ActWithThreeInputs_ActActionWithoutException_ActedInstanceReturned()
        {
            var arranged = new Arranged <string, int, double>("input", 1, 2.0);

            var result = arranged.Act((input, param1, param2) => { });

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Acted));
        }
Esempio n. 7
0
        public void ActWithTwoInputsAndReturnType_ActActionWithoutException_ActedInstanceReturned()
        {
            var arranged = new Arranged <string, int>("input", 1);

            var result = arranged.Act((input, parameter) => 1);

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Acted <int>));
        }
Esempio n. 8
0
        public void Act_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged();
            var called   = false;

            arranged.Act(() => called = true);

            Assert.IsTrue(called);
        }
Esempio n. 9
0
        public void ActWithInput_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged <string>("input");
            var called   = false;

            arranged.Act(input => called = true);

            Assert.IsTrue(called);
        }
Esempio n. 10
0
        public void ActWithInput_ActActionWithoutException_ActedInstanceReturned()
        {
            var arranged = new Arranged <string>("input");

            var result = arranged.Act(input => { });

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Acted));
        }
Esempio n. 11
0
        public void ActWithReturnType_ActActionWithException_ActActionIsCalled()
        {
            var arranged = new Arranged();
            var called   = false;

            arranged.Act <int>(() =>
            {
                called = true;
                throw new IOException();
            });

            Assert.IsTrue(called);
        }
Esempio n. 12
0
        public void ActWithReturnType_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged();
            var called   = false;

            arranged.Act(() =>
            {
                called = true;
                return(1);
            });

            Assert.IsTrue(called);
        }
Esempio n. 13
0
        public void ActWithFourInputsAndReturnType_ActActionWithException_ActActionIsCalled()
        {
            var arranged = new Arranged <string, int, double, decimal>("input", 1, 2.0, 3m);
            var called   = false;

            arranged.Act <int>((input, param1, param2, param3) =>
            {
                called = true;
                throw new IOException();
            });

            Assert.IsTrue(called);
        }
Esempio n. 14
0
        public void ActWithTwoInputsAndReturnType_ActActionWithException_ActActionIsCalled()
        {
            var arranged = new Arranged <string, int>("input", 1);
            var called   = false;

            arranged.Act <int>((input, parameter) =>
            {
                called = true;
                throw new IOException();
            });

            Assert.IsTrue(called);
        }
Esempio n. 15
0
        public void ActWithInputAndReturnType_ActActionWithException_ActActionIsCalled()
        {
            var arranged = new Arranged <string>("input");
            var called   = false;

            arranged.Act <int>(input =>
            {
                called = true;
                throw new IOException();
            });

            Assert.IsTrue(called);
        }
Esempio n. 16
0
        public void ActWithInputAndReturnType_ActActionWithoutException_ActActionIsCalled()
        {
            var arranged = new Arranged <string>("input");
            var called   = false;

            arranged.Act(input =>
            {
                called = true;
                return(1);
            });

            Assert.IsTrue(called);
        }