Пример #1
0
        public static IEnumerable <Tuple <GroupData, string> > GroupDataProvider()
        {
            var retval = new List <Tuple <GroupData, string> >();

            retval.Add(GroupFactory.GetGroupFactoryTupleByName("NameWith ' symbol"));
            retval.Add(GroupFactory.GetGroupFactoryTupleByName("LeaveFooterIntact"));
            retval.Add(GroupFactory.GetGroupFactoryTupleByName("EmptyGroup"));
            for (int i = 0; i < 3; i++)
            {
                retval.Add(GroupFactory.GetGroupFactoryTupleByName($"RandomString_{i}"));
            }
            return(retval);
        }
Пример #2
0
        public void PrepareANumberOfGroups(int groupIndex)
        {
            app.NavigationHelper.OpenGroupsPage();
            int numberOfDisplayedGroups             = GetGroupList().Count;
            int numberOfGroupsThatShouldBeDisplayed = groupIndex + 1;

            if (numberOfDisplayedGroups < numberOfGroupsThatShouldBeDisplayed)
            {
                for (int j = 0; j < numberOfGroupsThatShouldBeDisplayed - numberOfDisplayedGroups; j++)
                {
                    Create(GroupFactory.GetSampleGroupData());
                }
            }
        }
Пример #3
0
        public void GroupModificationTest()
        {
            GroupData data = GroupFactory.GetGroupDataByInstanceNameFromJson("GroupForModification");
            int       groupNumberToModify = 5;

            app.GroupHelper.PrepareANumberOfGroups(groupNumberToModify);

            List <GroupData> groupListPrev = app.GroupHelper.GetGroupList();

            app.GroupHelper.ModifyGroupByIndex(groupNumberToModify, data);
            List <GroupData> groupListAfter = app.GroupHelper.GetGroupList();

            List <GroupData> groupListExpected =
                app.GroupHelper.ModifyGroupNumberInList(groupListPrev, groupNumberToModify, data);

            app.GroupHelper.CormpareTwoGroupLists(
                app.GroupHelper.Sort(groupListAfter),
                app.GroupHelper.Sort(groupListExpected))
            .CheckTestResult();
        }