public RoyalMailApiClient(RoyalMailApiCredentials credentials) { if (credentials == null) { throw new NullReferenceException("Credentials must be not null"); } _credentials = credentials; }
public static void ClassInitialize(TestContext context) { _credentials = new RoyalMailApiCredentials(); _credentials.HttpSecurity.ClientId = ConfigurationManager.AppSettings["RoyalMailApiClientId"]; _credentials.HttpSecurity.ClientSecret = ConfigurationManager.AppSettings["RoyalMailApiClientSecret"]; _credentials.SoapSecurity.Username = ConfigurationManager.AppSettings["RoyalMailApiUsername"]; _credentials.SoapSecurity.Password = ConfigurationManager.AppSettings["RoyalMailApiPassword"]; _credentials.SoapSecurity.ApplicationId = ConfigurationManager.AppSettings["RoyalMailApiApplicationId"]; }