示例#1
0
        public void Complexe_Exception()
        {
            //Arrange
            var method = ControllerWithAllTestFunctions.GetMethod("TwoComplexTypes");

            //Act
            var methodInfos = MethodParameterManager.LoadParameterInfos(method);
        }
示例#2
0
        public void Complexe_Person()
        {
            //Arrange
            var method = ControllerWithAllTestFunctions.GetMethod("ComplexPerson");

            //Act
            var methodInfos = MethodParameterManager.LoadParameterInfos(method);

            //Assert
            Assert.IsTrue(methodInfos[0].IsComplexeType);
            Assert.IsFalse(methodInfos[0].IsString);
            Assert.AreEqual(methodInfos[0].ParameterName, "person");
        }
示例#3
0
        public void SimpleType_Int()
        {
            //Arrange
            var method = ControllerWithAllTestFunctions.GetMethod("IntParam");

            //Act
            var methodInfos = MethodParameterManager.LoadParameterInfos(method);

            //Assert
            Assert.IsFalse(methodInfos[0].IsComplexeType);
            Assert.IsFalse(methodInfos[0].IsString);
            Assert.AreEqual(methodInfos[0].ParameterName, "age");

            Assert.IsFalse(methodInfos[1].IsComplexeType);
            Assert.IsFalse(methodInfos[1].IsString);
            Assert.AreEqual(methodInfos[1].ParameterName, "age2");
        }