public async void BankIdFederatedLoginAsync_WithSamePersonalIdentityNumber_AtTheSameTime__ShouldThrow()
        {
            // Arange

            // Act
            await _grandIdClient.BankIdFederatedLoginAsync(new BankIdFederatedLoginRequest("https://c/", personalIdentityNumber : "201801012392"));

            // Assert
            await Assert.ThrowsAsync <GrandIdApiException>(() => _grandIdClient.BankIdFederatedLoginAsync(new BankIdFederatedLoginRequest("https://c/", personalIdentityNumber: "201801012392")));
        }
        public async void BankIdGetSessionAsync_WithSpecifiedPin_InBankIdLoginRequest__ShouldReturnPersonInfo_WithPin()
        {
            // Arange
            var grandIdClient = new GrandIdSimulatedApiClient("x", "x", "x")
            {
                Delay = TimeSpan.Zero
            };

            // Act
            var loginResponse = await grandIdClient.BankIdFederatedLoginAsync(new BankIdFederatedLoginRequest("https://c/", personalIdentityNumber : "201801012392"));

            var sessionResponse = await grandIdClient.BankIdGetSessionAsync(new BankIdGetSessionRequest(loginResponse.SessionId));

            // Assert
            Assert.Equal("201801012392", sessionResponse.Username);
            Assert.Equal("201801012392", sessionResponse.UserAttributes.PersonalIdentityNumber);
        }
        public async void BankIdGetSessionAsync_WithDefaultValuesInConstructor__ShouldReturnPersonInfo()
        {
            // Arange
            var grandIdClient = new GrandIdSimulatedApiClient("gn", "sn", "201801012392")
            {
                Delay = TimeSpan.Zero
            };

            // Act
            var loginResponse = await grandIdClient.BankIdFederatedLoginAsync(new BankIdFederatedLoginRequest("https://c/"));

            var sessionResponse = await grandIdClient.BankIdGetSessionAsync(new BankIdGetSessionRequest(loginResponse.SessionId));

            // Assert
            Assert.Equal("201801012392", sessionResponse.Username);
            Assert.Equal("201801012392", sessionResponse.UserAttributes.PersonalIdentityNumber);
            Assert.Equal("gn", sessionResponse.UserAttributes.GivenName);
            Assert.Equal("sn", sessionResponse.UserAttributes.Surname);
        }