public void ClearDropsAllIds() { var client = new Mock <ISubscriptionClientProxy>().Object; var idSet = new ClientTrackedMessageIdSet(); var result = idSet.ReserveMessageId("abc123"); Assert.IsTrue(result); result = idSet.ReserveMessageId("abc1234"); Assert.IsTrue(result); idSet.Clear(); Assert.IsFalse(idSet.Contains("abc123")); Assert.IsFalse(idSet.Contains("abc1234")); }
public void ContainsReturnsTrue_WhenIdIsPresent() { var client = new Mock <ISubscriptionClientProxy>().Object; var idSet = new ClientTrackedMessageIdSet(); var result = idSet.ReserveMessageId("abc123"); Assert.IsTrue(result); Assert.IsTrue(idSet.Contains("abc123")); }