示例#1
0
        public void ClearAsync()
        {
            IWatchListProvider provider = GetProvider();

            provider.AddAsync(personA, personB).Wait();
            provider.AddAsync(personA, personC).Wait();

            provider.ClearAsync(personA.Identity).Wait();

            IEnumerable <Person> buddies = provider.GetWatchedAsync(personA.Identity).Result;

            Assert.IsNotNull(buddies);
            CollectionAssert.IsEmpty(buddies);
        }
示例#2
0
        public void ClearAsyncInvalid()
        {
            IWatchListProvider provider = GetProvider();

            Assert.Throws <ArgumentNullException> (() => provider.ClearAsync(null));
        }