public async void Add_ShouldCreateMerchant_WhenAllIsWell() { //Arrange var merchant = new Merchant { Name = "TestMerchant" }; //Act var createdMerchant = await _merchantBc.Add(merchant); //Assert Assert.NotNull(createdMerchant); Assert.Equal(merchant.Name, createdMerchant.Name); Assert.NotEqual(default, createdMerchant.Id);
public async Task <IActionResult> Create(CreateMerchantDto merchant) { var createdMerchant = await _merchantBc.Add(new Merchant { Name = merchant.Name }); return(Ok(MerchantMappers.Map(createdMerchant))); }