public async Task GenerateStartRequestDoesNotCallFacebookApi()
        {
            // Arrange
            var config = CreateProviderConfig();

            var(restClientFactory, restClient) = CreateRestClientAndFactory();

            var provider = new FacebookProvider(config, restClientFactory, "url1", "url2");

            var http = Substitute.For <HttpRequest>();

            // Act
            var result = await provider.GenerateStartRequestUrl(http);

            // Assert
            await restClient.DidNotReceive().ExecuteAsync <AccessTokenResult>(Arg.Any <IRestRequest>());
        }
        public async Task GenerateStartRequestUrlReturnsToken()
        {
            // Arrange
            var config = CreateProviderConfig();

            var(restClientFactory, restClient) = CreateRestClientAndFactory();

            // Arrange - Calling Facebook API succeeds

            var provider = new FacebookProvider(config, restClientFactory, "url1", "url2");

            var http = Substitute.For <HttpRequest>();

            // Act
            var result = await provider.GenerateStartRequestUrl(http);

            // Assert
            Assert.NotNull(result.url);
            Assert.NotNull(result.secret);
            Assert.True(Guid.TryParse(result.secret, out var guidSecret));
        }