WasSuccessful() public method

public WasSuccessful ( ) : bool
return bool
コード例 #1
0
 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"));
 }
コード例 #2
0
        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));
            }
        }