예제 #1
0
        public void RemoveAsyncInvalid()
        {
            IWatchListProvider provider = GetProvider();

            Assert.Throws <ArgumentNullException> (() => provider.RemoveAsync(null, "buddyId"));
            Assert.Throws <ArgumentNullException> (() => provider.RemoveAsync("ownerId", null));
        }
예제 #2
0
        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);
        }