コード例 #1
0
        public void CorrectErrorMessageIsDisplayed_When_RegisteringWithInvalidFirstName()
        {
            //----------Arrange----------
            _user.FirstName = _generator.GenerateRandomStringName(SignUpPage.NAME_MIN_LENGTH)
                              + _generator.GenerateRandomStringNumber(1);
            List <Enum> expectedError = new List <Enum>
            {
                SignUpPage.Errors.invalidFirstName
            };

            _expectedErrorMessage = _signUpPage.GetExpectedErrorMessages(expectedError)[0];

            //----------Act----------
            _signUpPage.EnterAccountData(_user);
            _signUpPage.SubmitAccountData();

            //----------Assert----------
            _signUpPage.AssertErrorMessageIsDisplayed(_expectedErrorMessage);
        }