public void LoginTest()
      {
          // Act
          HeaderLogic.GoToSignUp();
          AuthenticationLogic.Login(_testFixture.Credentials);

          // Assert
          Assert.True(HeaderLogic.IsLoggedIn(), "Logout button is not displayed!");
      }
        public void RegisterTest()
        {
            // Assign
            var person = DataGenerator.GeneratePerson();

            // Act
            HeaderLogic.GoToSignUp();
            AuthenticationLogic.GoToCreateAccount(person);
            CreateAccountLogic.CreateAccount(person);

            // Assert
            Assert.True(MyAccountLogic.IsSucces(), "Succes message not is displayed!");
        }
      public void LoginWrongPasswordTest()
      {
          // Assign
          var credentials = new Credentials
          {
              Username = _testFixture.Credentials.Username,
              Password = "******"
          };

          // Act
          HeaderLogic.GoToSignUp();
          AuthenticationLogic.Login(credentials);

          // Assert
          Assert.False(HeaderLogic.IsLoggedIn());
      }
      public void LoginWrongUsernameTest()
      {
          // Assign
          var credentials = new Credentials
          {
              Username = "******",
              Password = _testFixture.Credentials.Password
          };

          // Act
          HeaderLogic.GoToSignUp();
          AuthenticationLogic.Login(credentials);

          // Assert
          Assert.False(HeaderLogic.IsLoggedIn());
      }
Пример #5
0
        public void ConfigureServices(IServiceCollection serviceColletion)
        {
            IHeaderLogic headerLogic = new HeaderLogic(Driver);

            serviceColletion.AddSingleton(headerLogic);

            IAuthenticationLogic authenticationLogic = new AuthenticationLogic(Driver);

            serviceColletion.AddSingleton(authenticationLogic);

            ICreateAccountLogic createAccountLogic = new CreateAccountLogic(Driver);

            serviceColletion.AddSingleton(createAccountLogic);

            IMyAccountLogic myAccountLogic = new MyAccountLogic(Driver);

            serviceColletion.AddSingleton(myAccountLogic);
        }