ArgsTests.ActionTests.TestActionHasWrongParameterType C# (CSharp) Метод

TestActionHasWrongParameterType() приватный Метод

private TestActionHasWrongParameterType ( ) : void
Результат void
        public void TestActionHasWrongParameterType()
        {
            var args = new string[] { "someaction", "aval", "bval" };

            try
            {
                var parsed = Args.ParseAction<ActionTestArgsActionMethodHasWrongParameterType>(args);
                Assert.Fail("An exception should have been thrown");
            }
            catch (InvalidArgDefinitionException ex)
            {
                Assert.AreEqual("Argument of type 'Object' does not match expected type 'SomeActionArgs'", ex.Message);
            }
        }