public async Task GetProfileAsync_WithString_IsNotNull()
        {
            var content = File.ReadAllText("SampleContent1.txt");

            var service = new PersonalityInsightsService(Settings.Username, Settings.Password);
            var profile = await service.GetProfileAsync(content).ConfigureAwait(false);

            Assert.NotNull(profile);
        }
        public async Task GetProfileAsync_WithOptions_IsNotNull()
        {
            var content = File.ReadAllText("SampleContent1.txt");

            var service = new PersonalityInsightsService(Settings.Username, Settings.Password);
            var options = new ProfileOptions(content) {IncludeRaw = true};
            var profile = await service.GetProfileAsync(options).ConfigureAwait(false);

            Assert.NotNull(profile);
        }
        public async Task GetProfileAsync_NullOptions_ThrowsArgumentNullException()
        {
            var service = new PersonalityInsightsService("username", "password", new WatsonSettings());

            var exception =
                await
                    Record.ExceptionAsync(async () => await service.GetProfileAsync(options: null).ConfigureAwait(false))
                        .ConfigureAwait(false);
            Assert.NotNull(exception);
            Assert.IsType<ArgumentNullException>(exception);
        }
        public async Task GetProfileAsync_ValidContent_Equal()
        {
            var mockHttpMessageHandler = new MockHttpMessageHandler();
            var mockResponse = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(MockPersonalityInsightsResponses.MockResponse)
            };

            mockHttpMessageHandler.AddResponseMessage(ServiceUrl, mockResponse);

            var httpCLient = new HttpClient(mockHttpMessageHandler);

            var service = new PersonalityInsightsService("username", "password", httpCLient, new WatsonSettings());
            var profile = await service.GetProfileAsync("Hello world").ConfigureAwait(false);

            Assert.NotNull(profile);
        }
        public async Task GetProfileAsync_WithContentItems_IsNotNull()
        {
            var content1 = File.ReadAllText("SampleContent1.txt");
            var content2 = File.ReadAllText("SampleContent2.txt");
            var service = new PersonalityInsightsService(Settings.Username, Settings.Password);

            var contentItems = new List<ContentItem>
            {
                new ContentItem(content1),
                new ContentItem(content2)
            };

            var content = new Content(contentItems);
            var options = new ProfileOptions(content);
            var profile = await service.GetProfileAsync(options).ConfigureAwait(false);

            Assert.NotNull(profile);
        }