예제 #1
0
        public async Task TestMatchUIViewDetails()
        {
            GenerateUIResponse uiResponse = null;

            Assert.DoesNotThrowAsync(async() => {
                MatchResponseValue matchResponse = (await Client.Match(_resumeIndexId, _documentId, _resumesIndexes)).Value;
                uiResponse = await Client.UI().ViewDetails(matchResponse, matchResponse.Matches[0].Id, IndexType.Resume, null);
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            Assert.DoesNotThrowAsync(async() => {
                BimetricScoreResponse scoreResponse = await Client.BimetricScore(BimetricScoringTests.TestParsedJobWithId, new List <ParsedResumeWithId>()
                {
                    BimetricScoringTests.TestParsedResumeWithId
                });
                uiResponse = await Client.UI().ViewDetails(scoreResponse.Value, BimetricScoringTests.TestParsedResumeWithId, IndexType.Job, null);
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            Assert.DoesNotThrowAsync(async() => {
                BimetricScoreResponse scoreResponse = await Client.BimetricScore(BimetricScoringTests.TestParsedResumeWithId, new List <ParsedJobWithId>()
                {
                    BimetricScoringTests.TestParsedJobWithId
                });
                uiResponse = await Client.UI().ViewDetails(scoreResponse.Value, BimetricScoringTests.TestParsedJobWithId, IndexType.Resume, null);
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            await Task.CompletedTask;
        }
예제 #2
0
        public async Task TestMatchUISearch()
        {
            GenerateUIResponse uiResponse = null;

            Assert.ThrowsAsync <SovrenException>(async() => {
                await Client.UI().Search(null, null);
            });

            Assert.ThrowsAsync <SovrenException>(async() => {
                await Client.UI().Search(new List <string>(), null);
            });

            Assert.DoesNotThrowAsync(async() => {
                uiResponse = await Client.UI().Search(_resumesIndexes, null);
            });

            Assert.That(await DoesURLExist(uiResponse.URL));
        }
예제 #3
0
        public async Task TestMatchUIMatchResume()
        {
            GenerateUIResponse uiResponse = null;

            Assert.ThrowsAsync <SovrenException>(async() => {
                await Client.UI().Match(TestParsedResume, null);
            });

            Assert.DoesNotThrowAsync(async() => {
                uiResponse = await Client.UI().Match(TestParsedResume, _resumesIndexes);
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            Assert.DoesNotThrowAsync(async() => {
                uiResponse = await Client.UI().Match(TestParsedResume, _jobsIndexes);
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            await Task.CompletedTask;
        }
예제 #4
0
        public async Task TestMatchUIMatchIndexedDocument()
        {
            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match("", null, null);
            });

            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match(null, _documentId, _resumesIndexes);
            });

            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match("", _documentId, _resumesIndexes);
            });

            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match(" ", _documentId, _resumesIndexes);
            });

            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match(_resumeIndexId, null, _resumesIndexes);;
            });

            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match(_resumeIndexId, "", _resumesIndexes);;
            });

            Assert.ThrowsAsync <ArgumentException>(async() =>
            {
                await Client.UI().Match(_resumeIndexId, " ", _resumesIndexes);;
            });

            Assert.ThrowsAsync <SovrenException>(async() =>
            {
                await Client.UI().Match(_resumeIndexId, _documentId, null);;
            });

            Assert.ThrowsAsync <SovrenException>(async() =>
            {
                await Client.UI().Match(_resumeIndexId, _documentId, new List <string>());;
            });

            GenerateUIResponse uiResponse = null;

            Assert.DoesNotThrowAsync(async() =>
            {
                uiResponse = await Client.UI().Match(_resumeIndexId, _documentId, _resumesIndexes);;
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            Assert.DoesNotThrowAsync(async() =>
            {
                uiResponse = await Client.UI().Match(_resumeIndexId, _documentId, _jobsIndexes);;
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            Assert.DoesNotThrowAsync(async() =>
            {
                uiResponse = await Client.UI().Match(_jobIndexId, _documentId, _resumesIndexes);;
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            Assert.DoesNotThrowAsync(async() =>
            {
                uiResponse = await Client.UI().Match(_jobIndexId, _documentId, _jobsIndexes);;
                Assert.That(await DoesURLExist(uiResponse.URL));
            });

            await Task.CompletedTask;
        }