public void ItDecodesGetUpdatesAnswerWithOneUpdate() { List <UpdateMessage> updates = ApiGetUpdatesDecoder.Decode(GET_UPDATES_ONE_UPDATE_RESPONSE); Assert.AreEqual(1, updates.Count); Assert.AreEqual(EXPECTED_ONE_UPDATE, updates.First()); }
public void ItDecodesGetUpdatesAnswerWithManyUpdates() { List <UpdateMessage> updates = ApiGetUpdatesDecoder.Decode(GET_UPDATES_MANY_UPDATES_RESPONSES); Assert.AreEqual(2, updates.Count); Assert.IsTrue(EXPECTED_MANY_UPDATES.All(update => updates.Contains(update))); }
public void ItDecodesGetUpdatesAnswerWithNoUpdates() { List <UpdateMessage> updates = ApiGetUpdatesDecoder.Decode(GET_UPDATES_EMPTY_RESPONSE); Assert.IsEmpty(updates); }