I have one file which is of common method and has too many methods inside a single class file, now I want to create hierarchy so it can be divided further with the help of abstraction, I tried few things but then I got confused on how to access different methods?
Main File
Now I want to create hierarchy such that main file common method will have on definitions of method and 2 separate class files will be there one for CMS Common Methods and one for WebSite Common methods
- using Base;
- using Constants;
- using Extensions;
- using Pages.CMSPages;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace ManualRegressionSuite.CommonMethods
- {
- public class CMSCommonMethods : Base
- {
-
-
-
-
- public void CommonMethod_CMSVerification(string OrderId)
- {
- var cmsLoginPage = GetInstance<CMSLoginPage>();
- cmsLoginPage.To_CMSLandingPage();
-
- var cmsLandingPage = GetInstance<CMSLandingPage>();
- cmsLandingPage.To_OrderPage_OrderCheck(OrderId);
-
- var cmsOrderPage = GetInstance<CMSOrderPage>();
- cmsOrderPage.orderDetailsView.To_Self_CheckPrices(shared_parameters.price);
-
- var check = cmsOrderPage.orderDetailsView.IsOrderAuthorised(OrderId.ToInt());
- Assert.IsTrue(check);
- }
-
-
-
- public void CommonMethod_CMSDespatchNoteVerification()
- {
- var cmsOrderPage = GetInstance<CMSOrderPage>();
- cmsOrderPage.ChangeStatus_ByDropDown(OrderStatus.Dispatched);
-
- cmsOrderPage.deliveryDetailsView.Check_DespatchNote();
- }
- }
- }