コード例 #1
0
        public void GetLocationInfoNullUser()
        {
            string json = "{\"event\":\"Checkout.Location.Submit\",\"checkout\":{\"id\":\"11143159-chre15971211283-3ca3e0ef9f\",\"passthrough\":\"bnVsbA==\"},\"product\":{\"id\":\"519714\",\"name\":\"ClivesApp1\"},\"user\":null}";
            var    cl   = ProcessStatus.GetCheckoutLoaded(json);

            Assert.AreEqual(cl.Checkout.ID, "11143159-chre15971211283-3ca3e0ef9f");
            Assert.AreEqual(cl.User.Email, null);
        }
コード例 #2
0
        public void GetLocationInfo()
        {
            string json = "{\"event\":\"Checkout.Location.Submit\",\"checkout\":{\"id\":\"11143159-chre15971211283-3ca3e0ef9f\",\"passthrough\":\"bnVsbA==\"},\"product\":{\"id\":\"519714\",\"name\":\"ClivesApp1\"},\"user\":{\"country\":\"GB\",\"email\":\"[email protected]\",\"id\":3524133}}";
            var    cl   = ProcessStatus.GetCheckoutLoaded(json);

            Assert.AreEqual(cl.EventType, "Checkout.Location.Submit");
            Assert.AreEqual(cl.User.Email, "*****@*****.**");
            Assert.AreEqual(cl.User.Country, "GB");
        }