/**
  * Test create tax rule.
  *
  * @param TaxRule $taxRule
  * @return void
  */
 public function testCreateTaxRule(TaxRule $taxRule)
 {
     // Steps
     $this->taxRuleIndexPage->open();
     $this->taxRuleIndexPage->getGridPageActions()->addNew();
     $this->taxRuleNewPage->getTaxRuleForm()->fill($taxRule);
     $this->taxRuleNewPage->getFormPageActions()->save();
 }
 /**
  * Assert that required tax rate is present in "Tax Rule Information" on tax rule creation page.
  *
  * @param TaxRuleIndex $taxRuleIndex
  * @param TaxRuleNew $taxRuleNew
  * @param TaxRate $taxRate
  * @return void
  */
 public function processAssert(TaxRuleIndex $taxRuleIndex, TaxRuleNew $taxRuleNew, TaxRate $taxRate)
 {
     $taxRateCode = $taxRate->getCode();
     $taxRuleIndex->open();
     $taxRuleIndex->getGridPageActions()->addNew();
     \PHPUnit_Framework_Assert::assertTrue($taxRuleNew->getTaxRuleForm()->isTaxRateAvailable($taxRateCode), "{$taxRateCode} is not present in Tax Rates multiselect on tax rule creation page.");
 }