Esempio n. 1
0
        public async Task Update_Product_By_ID_Should_Update_The_Correct_Product()
        {
            MongoProductStore productStore = new MongoProductStore();
            var result = await productStore.UpdateProductAsync(demoProductEntity);

            Assert.Equal(result.Name, demoProductEntity.Name);
        }
Esempio n. 2
0
        public async Task Update_Product_By_ID_Should_Not_Update_If_Id_Is_Wrong()
        {
            MongoProductStore productStore = new MongoProductStore();
            Exception         ex           = await Assert.ThrowsAsync <BaseException>(() => productStore.UpdateProductAsync(demoProductEntity2));

            Assert.Equal("Requested Id is not found.", ex.Message);
        }