Ejemplo n.º 1
0
        public void CreateFunction_functionName_ShouldReturnIRfcFunction()
        {
            var          functionName = "TEST";
            var          connection   = new RfcConnection(_interopMock.Object, RfcConfigurationOption);
            RfcErrorInfo errorInfo;

            _interopMock
            .Setup(x => x.GetFunctionDesc(It.IsAny <IntPtr>(), It.IsAny <string>(), out errorInfo))
            .Returns(FunctionDescriptionHandle);

            _interopMock
            .Setup(x => x.CreateFunction(It.IsAny <IntPtr>(), out errorInfo))
            .Returns(FunctionHandle);

            IRfcFunction function = connection.CreateFunction(functionName);

            function.Should().NotBeNull();
        }