예제 #1
0
        public async Task ShouldContainKeyAsync()
        {
            //arrange
            fixture.ResetDatastore();
            var card = fixture.GenerateBusinessCard();
            await fixture.Repository.RegisterAsync(card);

            await fixture.Repository.SaveAsync(card);

            //act
            var result = await fixture.Repository.ContainsKeyAsync(card.Id);

            //assert
            Assert.True(result);
        }
        public void ShouldContainKey()
        {
            //arrange
            fixture.ResetDatastore();
            var card = fixture.GenerateBusinessCard();

            fixture.Repository.Register(card);
            fixture.Repository.Save(card);

            //act
            var result = fixture.Repository.ContainsKey(card.Id);

            //assert
            Assert.True(result);
        }