<commit_before>﻿using System.Collections.Generic;
using System.IO;
using System.Linq;
using LendingClub;
using Xunit;

namespace LcapiTests
{
    public class LoanTest
    {
        private KeyValuePair<string, string> GetTestCredentials()
        {
            var lines = File.ReadLines(@"C:\Dropbox\Data\LocalRepos\lcapi\LCAPI\testCredentials.txt").ToList();
            return new KeyValuePair<string, string>(lines.First(), lines.Last());
        }

        private Loan CreateApiObject()
        {
            var cred = GetTestCredentials();
            var apiKey = cred.Value;

            return new Loan(apiKey);
        }

        [Fact]
        public void ListingTest()
        {
            var api = CreateApiObject();
            var listing = api.GetListingAsync().Result;

            Assert.NotNull(listing);
        }
    }
}<commit_msg>Break out listing variable in LoanTest<commit_after>﻿using System.Collections.Generic;
using System.IO;
using System.Linq;
using LendingClub;
using Xunit;

namespace LcapiTests
{
    public class LoanTest
    {
        private KeyValuePair<string, string> GetTestCredentials()
        {
            var lines = File.ReadLines(@"C:\Dropbox\Data\LocalRepos\lcapi\LCAPI\testCredentials.txt").ToList();
            return new KeyValuePair<string, string>(lines.First(), lines.Last());
        }

        private Loan CreateApiObject()
        {
            var cred = GetTestCredentials();
            var apiKey = cred.Value;

            return new Loan(apiKey);
        }

        [Fact]
        public void ListingTest()
        {
            var api = CreateApiObject();
            var task = api.GetListingAsync();

            var listing = task.Result;
            Assert.NotNull(listing);
        }
    }
}
{'fraction_non_alphanumeric': 0.10282485875706214, 'fraction_numerical': 0.0, 'mean_word_length': 2.0853658536585367, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5081221', 'n_tokens_mistral': 495, 'n_tokens_neox': 482, 'n_words': 108}