public void Should_GetAccessToken_AuthorizationHeader() { // Arrange const string accessToken = "access_token"; var accessMethod = new AuthorizationHeaderAccessMethod(); var request = new HttpRequestMessage(); // Act accessMethod.Set(request, accessToken); // Assert Assert.Equal(accessToken, accessMethod.Get(request)); }
public void Should_SetAccessToken_AuthorizationHeader() { // Arrange const string accessToken = "access_token"; var accessMethod = new AuthorizationHeaderAccessMethod(); var request = new HttpRequestMessage(); // Act accessMethod.Set(request, accessToken); // Assert Assert.Equal(AuthorizationHeaderAccessMethod.Scheme, request.Headers.Authorization.Scheme); Assert.Equal(accessToken, request.Headers.Authorization.Parameter); }