public void Authentication_IfUsingUsernameAndPassword_Successful()
        {
            context = new ApiContext(environment, username, password);
            service = new PaymentServiceApi(context, true);

            service.AuthenticationService.Authenticate();

            Assert.True(service.AuthenticationService.IsThereAuthentication());
        }
 public void SetupState()
 {
     configuration = ConfigurationHelper.GetConfiguration();
     environment   = Environments.Sandbox;
     username      = configuration["Payment:Username"];
     password      = configuration["Payment:Password"];
     apiKey        = configuration["Payment:ApiKey"];
     context       = new ApiContext(environment, apiKey)
     {
         Correlation = Guid.NewGuid().ToString(),
     };
     service = new PaymentServiceApi(context, true);
 }