Exemplo n.º 1
0
        public async Task Exists_AfterInsert_ShouldExists()
        {
            ISubscribedServerRepository repo = new SubscribedServerRepository(GetMysql());

            await repo.Add(DefaultTestData.DefaultServer, 123, 321u);

            Assert.True(await repo.Exists(DefaultTestData.DefaultServer, 321u));
        }
Exemplo n.º 2
0
        public async Task Remove_ShouldRemoveRecord()
        {
            ISubscribedServerRepository repo = new SubscribedServerRepository(GetMysql());

            await repo.Add(DefaultTestData.DefaultServer, 123, 321u);

            await repo.Remove(DefaultTestData.DefaultServer, 321u);

            Assert.False(await repo.Exists(DefaultTestData.DefaultServer, 321u));
        }
Exemplo n.º 3
0
        public async Task Exists_WhenNoServerSubscribed_ShouldReturnFalse()
        {
            ISubscribedServerRepository repo = new SubscribedServerRepository(GetMysql());

            Assert.False(await repo.Exists(DefaultTestData.DefaultServer, 123u));
        }