public void RemoveAsyncInvalid() { IWatchListProvider provider = GetProvider(); Assert.Throws <ArgumentNullException> (() => provider.RemoveAsync(null, "buddyId")); Assert.Throws <ArgumentNullException> (() => provider.RemoveAsync("ownerId", null)); }
public void RemoveAsync() { IWatchListProvider provider = GetProvider(); provider.AddAsync(personA, personB).Wait(); provider.AddAsync(personA, personC).Wait(); provider.RemoveAsync(personA.Identity, personB.Identity).Wait(); IEnumerable <Person> buddies = provider.GetWatchedAsync(personA.Identity).Result; CollectionAssert.DoesNotContain(buddies, personB); CollectionAssert.Contains(buddies, personC); }