コード例 #1
0
        public void GetIndexOfArrayWhereSumOfLeftEqualsRight()
        {
            //Setup
            var buttonFeaturePage = new NavigateToSection();

            buttonFeaturePage.GivenIHaveTheECSDigitalTechAppOpen();
            buttonFeaturePage.WhenIPressTheRenderChallengeButton();

            //Act
            var arrayPage = new ArrayChallengePage();
            var rowList1  = arrayPage.GetRowList(0);
            var rowList2  = arrayPage.GetRowList(1);
            var rowList3  = arrayPage.GetRowList(2);

            var findIndexOfSumLeftEqualsRightRow1 = GetCorrectIndex(rowList1);
            var findIndexOfSumLeftEqualsRightRow2 = GetCorrectIndex(rowList2);
            var findIndexOfSumLeftEqualsRightRow3 = GetCorrectIndex(rowList3);

            //Assert
            findIndexOfSumLeftEqualsRightRow1.ShouldBeEqualTo(4);
            findIndexOfSumLeftEqualsRightRow2.ShouldBeEqualTo(3);
            findIndexOfSumLeftEqualsRightRow3.ShouldBeEqualTo(5);
        }
コード例 #2
0
        public void ThenIShouldBeTakenToTheArraysChallengeSection()
        {
            var welcomePageTitle = new ArrayChallengePage().GetSectionTitle();

            welcomePageTitle.ShouldBeEqualTo("Arrays Challenge");
        }