[TestMethod]
public void TestMethod1()
{
var client = new RestClient("http://localhost:3000");
var request=new RestRequest("posts/{postid}", Method.Get);
request.AddUrlSegment("postid", 1);
var response= client.Execute(request);
var deserialize = new JsonDeserializer();
var output= deserialize.Deserialize<Dictionary<string, string>>(response);
var result = output["author"];
Assert.That(result, Is.EqualTo("Karthik K"), "Author is not correct");
}
}
}
Getting error for below two lines:
var deserialize = new JsonDeserializer(); //Error CS0246 The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?)
var result = output["author"]; // Error CS0021 Cannot apply indexing with [] to an expression of type 'type'
Note: I am using Community edition which is free