示例#1
0
        public void GetDeliveryStatus_Invalid_TransactionIdXml()
        {
            var target = new ElasticemailWebApi(_apiKey);

            var actual = target.GetDeliveryStatusXml(Guid.Parse("f088b2e9-5412-47f2-9cec-225b71ee6672"));

            Assert.AreEqual(ResultType.Error, actual.ResultType);
            Assert.AreEqual("No job with transactionId f088b2e9-5412-47f2-9cec-225b71ee6672 could be found.", actual.ErrorMessage);
        }
示例#2
0
        public void GetDeliveryStatus_Valid_TransactionIdXml()
        {
            Guid id     = Guid.Parse("f088b2e9-5412-47f2-9cec-225b71ee667c");
            var  target = new ElasticemailWebApi(_apiKey);

            var actual = target.GetDeliveryStatusXml(id);

            Assert.AreEqual(ResultType.Success, actual.ResultType);
            Assert.AreEqual(id, actual.DeliveryStatus.Id);
            Assert.AreEqual(1, actual.DeliveryStatus.Delivered);
            Assert.AreEqual("complete", actual.DeliveryStatus.Status);
        }