public void GroupDadJokesTest()
        {
            using (HttpClient client = new HttpClient())
            {
                DadJokesService service  = new DadJokesService();
                var             settings = service.JokesSettings;

                DadJokes dadJokes = new DadJokes();
                DadJoke  joke1    = new DadJoke();
                joke1.Joke = @"Why do bears have hairy coats? Fur protection.";
                dadJokes.Results.Add(joke1);

                DadJoke joke2 = new DadJoke();
                joke2.Joke = @"What time did the man go to the dentist? Tooth hurt-y.";
                dadJokes.Results.Add(joke2);

                DadJoke joke3 = new DadJoke();
                joke3.Joke = @"What did the left eye say to the right eye? Between us, something smells!";
                dadJokes.Results.Add(joke3);

                DadJoke joke4 = new DadJoke();
                joke4.Joke = @"To the guy who invented zero... thanks for nothing.";
                dadJokes.Results.Add(joke4);

                Assert.IsNotNull(dadJokes);

                IList <DadJoke> shortJokes  = new List <DadJoke>();
                IList <DadJoke> mediumJokes = new List <DadJoke>();
                IList <DadJoke> longJokes   = new List <DadJoke>();

                foreach (DadJoke dadJoke in dadJokes.Results)
                {
                    int wordCount = service.CountWords(dadJoke.Joke);

                    if (wordCount < settings.ShortJokeLimit)
                    {
                        shortJokes.Add(dadJoke);
                    }
                    else if (wordCount > settings.ShortJokeLimit && wordCount < settings.MediumJokeLimit)
                    {
                        mediumJokes.Add(dadJoke);
                    }
                    else
                    {
                        longJokes.Add(dadJoke);
                    }
                }

                Assert.IsTrue(shortJokes.Count != 0 || mediumJokes.Count != 0 || longJokes.Count != 0);
            }
        }
        public async Task GetASingleDadJokeTest()
        {
            string responseBody = "";

            using (HttpClient client = new HttpClient())
            {    // set up the DadJokesSettings
                DadJokesSettings settings = new DadJokesSettings();
                foreach (var dadJokeKeyPair in settings.clientSettings)
                {
                    client.DefaultRequestHeaders.Add(dadJokeKeyPair.Key, dadJokeKeyPair.Value);
                }

                responseBody = await client.GetStringAsync(settings.BaseURL);

                Assert.IsTrue(responseBody.Length != 0);

                DadJoke dadJoke = JsonConvert.DeserializeObject <DadJoke>(responseBody);
                Assert.IsNotNull(dadJoke);
            }
        }