private void ValidateLastMonthBehaviourWithThreeCostSources(bool isLastMonthLockEnabled, ReadOnlyCollection <IWebElement> billingSplitRowTextBoxes, CustomBillingMonthData billingMonth) { if (isLastMonthLockEnabled) { var isCustomOptionPresent = IsOptionPresentInBillingSplitTextBox(billingSplitRowTextBoxes[0], "Custom"); Assert.IsFalse(isCustomOptionPresent, "Last Month Planned should NOT be customizable"); ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[1], billingMonth.FirstParty); ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[2], billingMonth.Actual); } else { Assert.IsFalse(billingSplitRowTextBoxes[0].Enabled, "Last Month Planned should NOT be enabled"); ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[1], billingMonth.FirstParty); ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[2], billingMonth.Actual); } }
private void SetCustomBillingDataWithThreeCostSources(bool isLastMonthLockEnabled, ReadOnlyCollection <IWebElement> billingSplitRowTextBoxes, CustomBillingMonthData billingMonth) { if (billingMonth.IsLastMonth) { ValidateLastMonthBehaviourWithThreeCostSources(isLastMonthLockEnabled, billingSplitRowTextBoxes, billingMonth); } else { ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[0], billingMonth.Planned); ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[1], billingMonth.FirstParty); ClearInputAndTypeValueIfRequired(billingSplitRowTextBoxes[2], billingMonth.Actual); } }