Esempio n. 1
0
        public void GenericWithTwoArgsSucceeds()
        {
            int      arg1     = 1;
            string   arg2     = "abc";
            TestType instance = TypeActivator.CreateInstance <TestType, int, string>(arg1, arg2);

            instance.Arg1.Should()
            .Be(arg1);
            instance.Arg2.Should()
            .Be(arg2);
        }
Esempio n. 2
0
        public void GenericWithThreeArgsSucceeds()
        {
            int      arg1     = 1;
            string   arg2     = "abc";
            char     arg3     = 'x';
            TestType instance = TypeActivator.CreateInstance <TestType, int, string, char>(arg1, arg2, arg3);

            instance.Arg1.Should()
            .Be(arg1);
            instance.Arg2.Should()
            .Be(arg2);
            instance.Arg3.Should()
            .Be(arg3);
        }
Esempio n. 3
0
        public void GenericWithFourArgsSucceeds()
        {
            int      arg1     = 1;
            string   arg2     = "abc";
            char     arg3     = 'x';
            var      arg4     = new TestType();
            TestType instance = TypeActivator.CreateInstance <TestType, int, string, char, TestType>(arg1, arg2, arg3, arg4);

            instance.Arg1.Should()
            .Be(arg1);
            instance.Arg2.Should()
            .Be(arg2);
            instance.Arg3.Should()
            .Be(arg3);
            instance.Arg4.Should()
            .BeSameAs(arg4);
        }