コード例 #1
0
      public void LoginTest()
      {
          // Act
          HeaderLogic.GoToSignUp();
          AuthenticationLogic.Login(_testFixture.Credentials);

          // Assert
          Assert.True(HeaderLogic.IsLoggedIn(), "Logout button is not displayed!");
      }
コード例 #2
0
        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!");
        }
コード例 #3
0
      public void LoginWrongPasswordTest()
      {
          // Assign
          var credentials = new Credentials
          {
              Username = _testFixture.Credentials.Username,
              Password = "******"
          };

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

          // Assert
          Assert.False(HeaderLogic.IsLoggedIn());
      }
コード例 #4
0
      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);
        }