コード例 #1
0
        public void CreateTransaction_ShouldReturnIRfcTransaction()
        {
            var          connection = new RfcConnection(_interopMock.Object, RfcConfigurationOption);
            RfcErrorInfo errorInfo;
            string       tid;

            _interopMock
            .Setup(x => x.GetTransactionId(It.IsAny <IntPtr>(), out tid, out errorInfo))
            .Returns(RfcResultCodes.RFC_OK);

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

            IRfcTransaction transaction = connection.CreateTransaction();

            transaction.Should().NotBeNull();
        }