/** * @magentoDbIsolation enabled * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage postcode */ public function testUpdateTaxRateMissingRequiredFields() { $taxRate = $this->taxRateBuilder->setCountryId('US')->setRegionId(42)->setPercentageRate(8.25)->setCode('UpdateTaxRates')->setPostcode('78780')->create(); $taxRate = $this->taxRateService->createTaxRate($taxRate); $updatedTaxRate = $this->taxRateBuilder->populate($taxRate)->setPostcode(null)->create(); $this->taxRateService->updateTaxRate($updatedTaxRate); }
/** * @expectedException \Magento\Framework\Exception\InputException */ public function testUpdateTaxRateMissingRequiredInfo() { $taxRate = $this->taxRateBuilder->setId(2)->setCode('Rate-Code')->setCountryId('US')->setPercentageRate(0.1)->setRegionId('TX')->create(); $this->taxRateService->updateTaxRate($taxRate); }