public void AddCredentials_WithHttpWebRequestAdapterAndBasicEsendexCredentials() { // Arrange EsendexCredentials credentials = new EsendexCredentials("username", "password"); IHttpWebRequestAdapter httpRequest = new HttpWebRequestAdapter(uri); // Act helper.AddCredentials(httpRequest, credentials); // Assert string username = httpRequest.Credentials.GetCredential(uri, "Basic").UserName; string password = httpRequest.Credentials.GetCredential(uri, "Basic").Password; Assert.AreEqual(credentials.Username, username); Assert.AreEqual(credentials.Password, password); }