コード例 #1
0
        public void ActionType_ExceedsMaximumParameterCount()
        {
            var implementation21 = new DynamicParamList(new Type[21], new object[21]);

            Assert.That(
                () => implementation21.ActionType,
                Throws.InvalidOperationException.With.Message.EqualTo(
                    "Getting the ActionType for a DynamicParamList is only supported for up to 20 parameters but the DynamicParamList was initialized with 21 parameters."));
        }
コード例 #2
0
 public void SetUp()
 {
     _implementation0  = new DynamicParamList(new Type[0], new object[0]);
     _implementation1  = new DynamicParamList(new[] { typeof(int) }, new object[] { 1 });
     _implementation3  = new DynamicParamList(new[] { typeof(int), typeof(string), typeof(double) }, new object[] { 1, "2", 3.0 });
     _implementation20 = new DynamicParamList(
         new[]
     {
         typeof(int), typeof(string), typeof(double), typeof(bool), typeof(bool),
         typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool),
         typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool),
         typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(byte)
     },
         new object[] { 1, "2", 3.0, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, (byte)20 });
 }