public void testGetTrackingByNumber12() { int i; List <Tracking> listTrackings = connection.getTrackings(1); Console.WriteLine("number of trackings" + listTrackings.Count); for (i = 0; i < listTrackings.Count; i++) { listTrackings [i].ToString(); } }
public void testGetTrackings() { //get the first 100 Trackings List <Tracking> listTrackings100 = connection.getTrackings(1); // Assert.AreEqual(10, listTrackings100.Count); //at least we have 10 elements Assert.IsNotNull(listTrackings100[0].ToString()); Assert.IsNotNull(listTrackings100[10].ToString()); }
// https://secure.aftership.com/#/dashboard public static void ConsultarEventos() { try { ConnectionAPI connection = new ConnectionAPI("d108bf81-5235-4ea9-9b42-045524739511"); List <Tracking> listTrackings = connection.getTrackings(1); for (i = 0; i < listTrackings.Count; i++) { if (listTrackings[i].tag != StatusTag.Pending && listTrackings[i].updatedAt > DateTime.Now.AddMinutes(-1)) { SendEmail(listTrackings); } } } catch (Exception e) { throw e; } }