public async Task Get_Product_By_ID_Should_Return_Particular_Product() { MongoProductStore productStore = new MongoProductStore(); var product = await productStore.GetProductAsync(demoProductEntity.Id); Assert.Equal(product.Product.Id, demoProductEntity.Id); }
public async Task Get_Product_By_ID_Should_Return_Exception_If_Id_IS_Invalid() { MongoProductStore productStore = new MongoProductStore(); Exception ex = await Assert.ThrowsAsync <BaseException>(() => productStore.GetProductAsync(demoProductEntity.Id + "INVALID_ID")); Assert.Equal("Requested Id is not found.", ex.Message); }