Example #1
0
        public void NewParamsOnly()
        {
            ConstructorTestHelpers.NewParamsOnly(
                () =>
            {
                var immediateType = new ImmediateType(typeof(ParamsOnlyConstructor));
                return(immediateType.New());
            },
                () => new ParamsOnlyConstructor());

            ConstructorTestHelpers.NewParamsOnly(
                () =>
            {
                var immediateType = new ImmediateType(typeof(IntParamsOnlyConstructor));
                return(immediateType.New());
            },
                () => new IntParamsOnlyConstructor());

            ConstructorTestHelpers.NewParamsOnly(
                () =>
            {
                var immediateType = new ImmediateType(typeof(NullableIntParamsOnlyConstructor));
                return(immediateType.New());
            },
                () => new NullableIntParamsOnlyConstructor());
        }
Example #2
0
        public void NewParamsOnly()
        {
            ConstructorTestHelpers.NewParamsOnly(
                () => TypeExtensions.New(typeof(ParamsOnlyConstructor)),
                () => new ParamsOnlyConstructor());

            ConstructorTestHelpers.NewParamsOnly(
                () => TypeExtensions.New(typeof(IntParamsOnlyConstructor)),
                () => new IntParamsOnlyConstructor());

            ConstructorTestHelpers.NewParamsOnly(
                () => TypeExtensions.New(typeof(NullableIntParamsOnlyConstructor)),
                () => new NullableIntParamsOnlyConstructor());
        }