/**
  * Assert that necessary tax rate percent is in correct range between 0 and 100.
  *
  * @param TaxRateIndex $taxRateIndex
  * @param TaxRateEdit $taxRateEdit
  * @param TaxRate $taxRate
  * @return void
  */
 public function processAssert(TaxRateIndex $taxRateIndex, TaxRateEdit $taxRateEdit, TaxRate $taxRate)
 {
     $taxRateCode = $taxRate->getCode();
     $taxRateIndex->open()->getTaxRatesGrid()->searchAndOpen(['code' => $taxRateCode]);
     $ratePercentage = $taxRateEdit->getTaxRateForm()->getTaxRatePercentage();
     \PHPUnit_Framework_Assert::assertTrue($ratePercentage >= 0 && $ratePercentage <= 100, "{$taxRateCode} rate percent {$ratePercentage} is not in correct range between 0 and 100.");
 }
 /**
  * Delete Tax Rate Entity test.
  *
  * @param TaxRate $taxRate
  * @return void
  */
 public function testDeleteTaxRate(TaxRate $taxRate)
 {
     // Precondition
     $taxRate->persist();
     // Steps
     $this->taxRateIndex->open();
     $this->taxRateIndex->getTaxRatesGrid()->searchAndOpen(['code' => $taxRate->getCode()]);
     $this->taxRateEdit->getFormPageActions()->deleteAndAcceptAlert();
 }