public async void LogoutAsync_WithSessionId__ShouldGetToGrandIdFederatedLogin_WithSessionId() { // Arrange // Act await _grandIdApiClient.LogoutAsync(new LogoutRequest("s")); // Assert var request = _messageHandlerMock.GetFirstArgumentOfFirstInvocation <HttpMessageHandler, HttpRequestMessage>(); Assert.Contains("sessionid=s", request.RequestUri.ToString()); }
public async void LogoutAsync_WithGrandIdLogoutRequest__ShouldParseAndReturnSessionDeleted() { // Arrange var httpClient = GetHttpClientMockWithOkResponse("{ \"sessiondeleted\": \"1\" }"); var grandIdApiClient = new GrandIdApiClient(httpClient, new GrandIdApiClientConfiguration("x", "bsk")); // Act var result = await grandIdApiClient.LogoutAsync(new LogoutRequest("s")); // Assert Assert.NotNull(result); Assert.True(result.SessionDeleted); }