public void TestMerchantInfoDefaults() { var message = new EchoRequestMessage(); Assert.AreEqual(null, message.MerchantInfo.MerchantId); Assert.AreEqual(null, message.MerchantInfo.Password); message.Prepare(); Assert.AreEqual(null, message.MerchantInfo.MerchantId); Assert.AreEqual(null, message.MerchantInfo.Password); }
public void TestCloneRequestMessage() { // Serialize. var message = new EchoRequestMessage(CreateMessageInfo(), CreateMerchantInfo(false)); message.Prepare(); var serializedMessage = Serialization.Serialize((EchoRequestMessage)message.Clone()); // Check. AssertRequestMessage(message, serializedMessage); }
public void TestMessageInfoDefaults() { var message = new EchoRequestMessage(); Assert.AreEqual(null, message.MessageInfo.MessageId); Assert.AreEqual(null, message.MessageInfo.MessageTimestamp); Assert.AreEqual(0, message.MessageInfo.Timeout); Assert.AreEqual(null, message.MessageInfo.ApiVersion); message.Prepare(); Assert.IsNotNull(message.MessageInfo.MessageId); Assert.IsNotNull(message.MessageInfo.MessageTimestamp); Assert.AreEqual(60, message.MessageInfo.Timeout); Assert.AreEqual("xml-4.2", message.MessageInfo.ApiVersion); }
public void TestEchoMessage() { // Request. var requestMessage = new EchoRequestMessage(CreateMessageInfo(), CreateMerchantInfo(false)); requestMessage.Prepare(); // Response. var responseMessage = GetCommand().Send(requestMessage); // Check. AssertResponse(responseMessage); AssertRequestResponse(requestMessage, responseMessage); }