protected void AssertStatusGoodSuccessMarkerNoConnectionIssuesForPeriodicPayment(SecurePayMessage r) { Assert.IsNotNull(r); Assert.That(r.Status.StatusDescription, Is.Not.ContainsSubstring("Unable to connect to server")); Assert.That(r.Status.StatusDescription, Is.EqualTo("Normal")); Assert.True(SecurePayGateway.ValidSuccessResponseCode.Contains(r.Status.StatusCode)); Assert.True(r.WasSuccessful()); Assert.That(r.Periodic.PeriodicList.PeriodicItem[0].Successful, Is.EqualTo("yes")); }
public void SecurePayMessage_WasSuccessful() { foreach (var code in new List<int> { 0, 8, 11, 16, 77 }) { var spm = new SecurePayMessage { Status = new SecurePayStatus { StatusDescription = "Normal", StatusCode = code } }; Assert.True(spm.WasSuccessful(), string.Format("Code '{0}' did not return success", code)); } }