Exemplo n.º 1
0
        public void AddRangeAsyncInvalid()
        {
            IWatchListProvider provider = GetProvider();

            Assert.Throws <ArgumentNullException> (() => provider.AddRangeAsync(null, Enumerable.Empty <Person>()));
            Assert.Throws <ArgumentNullException> (() => provider.AddRangeAsync(personA, null));
        }
Exemplo n.º 2
0
        public void GetWatchers()
        {
            IWatchListProvider provider = GetProvider();

            provider.AddRangeAsync(personA, new[] { personB, personC }).Wait();
            provider.AddRangeAsync(personB, new[] { personA, personC }).Wait();

            IEnumerable <Person> watchers = provider.GetWatchersAsync(personC.Identity).Result;

            CollectionAssert.Contains(watchers, personA);
            CollectionAssert.Contains(watchers, personB);
        }
Exemplo n.º 3
0
        public void AddRangeAsync()
        {
            IWatchListProvider provider = GetProvider();

            provider.AddRangeAsync(personA, new[] { personB, personC }).Wait();

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

            CollectionAssert.Contains(buddies, personB);
            CollectionAssert.Contains(buddies, personC);
        }