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

            Assert.That(() => provider.GetIsWatcherAsync(null, "asdf"), Throws.InstanceOf <ArgumentNullException>());
            Assert.That(() => provider.GetIsWatcherAsync("asdf", null), Throws.InstanceOf <ArgumentNullException>());
        }
示例#2
0
        public void GetIsWatcherAsync()
        {
            IWatchListProvider provider = GetProvider();

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

            Assert.That(provider.GetIsWatcherAsync(personA.Identity, personB.Identity).Result, Is.True);
            Assert.That(provider.GetIsWatcherAsync(personB.Identity, personA.Identity).Result, Is.False);
        }