Skip to content

tests(linkedpatemplates): added tests for Linked PA Templates API - #80

Open
srajak8 wants to merge 4 commits into
masterfrom
feat/sdk/dotnet/tests-linked-pa-templates
Open

tests(linkedpatemplates): added tests for Linked PA Templates API#80
srajak8 wants to merge 4 commits into
masterfrom
feat/sdk/dotnet/tests-linked-pa-templates

Conversation

@srajak8

@srajak8 srajak8 commented Aug 13, 2022

Copy link
Copy Markdown
Contributor

added tests for Linked PA Templates API

@Ramanth Ramanth (Ramanth) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. looking good. left minor comments

using FactSet.AnalyticsAPI.Engines.Client;
using FactSet.AnalyticsAPI.Engines.Model;
using System.Collections.Generic;
using System.Net;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this duplicate using statement, its already used above


Assert.IsTrue(response.StatusCode == HttpStatusCode.OK, "Response should be 200 - Success");
Assert.IsTrue(response.Data.Data.GetType() == typeof(Dictionary<string, LinkedPATemplateSummary>), "Response should be of Dictionary type.");
Assert.IsTrue(response.Data.Data[firstTemplate].GetType() == typeof(LinkedPATemplateSummary), "Response should be of LinkedPATemplateSummary type.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: change the assertion description to "Response dictionary value should be of LinkedPATemplateSummary type"

const string description = "This is a linked PA template that only returns security level data";
List<string> mandatory = new List<string>(2);
mandatory.Add("accounts");
mandatory.Add("benchmarks");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to declare and initialize the string list in the single line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants