public void Parse_Summary_Only() { var xmlResponse = getSampleResponse("SummaryOnly.xml"); var activities = TrackingResponse.GetActivities(xmlResponse); Assert.AreEqual(1, activities.Count); }
public void Parse_Multi_Step_Response_Verify_Activities_Count() { string xmlResponse = getSampleResponse("MultipleActivities.xml"); List <Activity> activities = TrackingResponse.GetActivities(xmlResponse); Assert.AreEqual(4, activities.Count); }
public void Parse_Multi_Step_Response_Verify_Activities() { string xmlResponse = getSampleResponse("MultipleActivities.xml"); List <Activity> activities = TrackingResponse.GetActivities(xmlResponse); Assert.AreEqual(DateTime.Parse("5-9-08"), activities[0].Timestamp); Assert.AreEqual("Electronic Shipping Info Received", activities[0].ShortDescription); Assert.AreEqual(DateTime.Parse("May 09, 2008, 9:35 pm"), activities[1].Timestamp); Assert.AreEqual("Processed", activities[1].ShortDescription); Assert.AreEqual("WEST PALM BEACH, FL 33416", activities[1].LocationDescription); Assert.AreEqual(DateTime.Parse("May 11, 2008, 12:21 am"), activities[2].Timestamp); Assert.AreEqual("Processed", activities[2].ShortDescription); Assert.AreEqual("SAINT PAUL, MN 55101", activities[2].LocationDescription); Assert.AreEqual(DateTime.Parse("May 12, 2008 4:44 pm"), activities[3].Timestamp); Assert.AreEqual("Your item was delivered", activities[3].ShortDescription); Assert.AreEqual("LA FARGE, WI 54639", activities[3].LocationDescription); }