Beispiel #1
0
        internal void Edit(IncomeTermType incomeTermType)
        {
            this.GetResult(1);
            this.ClickEdit();

            if (!this.Name.GetAttribute("value").Equals(incomeTermType.Name) || !incomeTermType.Name.Trim().Equals(string.Empty))
            {
                this.Type(this.Name, incomeTermType.Name);
            }

            if (!this.Description.GetAttribute("value").Equals(incomeTermType.Description) || !incomeTermType.Description.Trim().Equals(string.Empty))
            {
                this.Type(this.Description, incomeTermType.Description);
            }

            if (!this.Types.SelectedOption.GetAttribute("value").Equals(incomeTermType.Type) || !incomeTermType.Type.Trim().Equals(string.Empty))
            {
                this.SelectByText(this.Types, incomeTermType.Type);
            }

            if (!this.Code.GetAttribute("value").Equals(incomeTermType.Code) || !incomeTermType.Code.Trim().Equals(string.Empty))
            {
                this.Type(this.Code, incomeTermType.Code);
            }

            if (!this.DisplayOrder.GetAttribute("value").Equals(incomeTermType.DisplayOrder) || !incomeTermType.DisplayOrder.Trim().Equals(string.Empty))
            {
                this.Type(this.DisplayOrder, incomeTermType.DisplayOrder);
            }

            this.ClickSave();
        }
        internal void AssertChanges(IncomeTermType incomeType)
        {
            this.GetResult(1);

            if (!incomeType.Name.Trim().Equals(string.Empty))
            {
                Assert.IsTrue(this.Name.GetAttribute("value").Equals(incomeType.Name), "Unsuccesfull Edit on field Name. Actual is: " + this.Name.GetAttribute("value").ToString() + "expected is: " + incomeType.Name);
            }

            if (!incomeType.Description.Trim().Equals(string.Empty))
            {
                Assert.IsTrue(this.Description.GetAttribute("value").Equals(incomeType.Description), "Unsuccesfull Edit on field Description. Actual is: " + this.DisplayOrder.GetAttribute("value").ToString() + "expected is: " + incomeType.DisplayOrder);
            }

            if (!incomeType.Type.Trim().Equals(string.Empty))
            {
                Assert.IsTrue(this.Types.SelectedOption.GetAttribute("value").Equals(incomeType.Type), "Unsuccesfull Edit on field Group. Actual is: " + this.Types.SelectedOption.GetAttribute("value").ToString() + "expected is: " + incomeType.Type);
            }

            if (!incomeType.Code.Trim().Equals(string.Empty))
            {
                Assert.IsTrue(this.Code.GetAttribute("value").Equals(incomeType.Code), "Unsuccesfull Edit on field Code. Actual is: " + this.DisplayOrder.GetAttribute("value").ToString() + "expected is: " + incomeType.Code);
            }

            if (!incomeType.DisplayOrder.Trim().Equals(string.Empty))
            {
                Assert.IsTrue(this.DisplayOrder.GetAttribute("value").Equals(incomeType.DisplayOrder), "Unsuccesfull Edit on field DisplayOrder. Actual is: " + this.DisplayOrder.GetAttribute("value").ToString() + "expected is: " + incomeType.DisplayOrder);
            }
        }
Beispiel #3
0
 internal void AddNew(IncomeTermType incomeTermType)
 {
     this.Type(this.Name, incomeTermType.Name);
     this.Type(this.Description, incomeTermType.Description);
     this.SelectByText(this.Types, incomeTermType.Type);
     this.Type(this.Code, incomeTermType.Code);
     this.Type(this.DisplayOrder, incomeTermType.DisplayOrder);
     this.ClickSave();
 }