public void GetCallRecordingWithFieldsParam() { string expectedJson = GetJsonPayload("/callstexts/callsApi/response/getCallRecording.json"); var restRequest = MockRestResponse(expectedJson); CallRecording callRecording = Client.CallsApi.GetCallRecording(10, FIELDS); Assert.That(Serializer.Serialize(callRecording), Is.EqualTo(expectedJson)); Assert.AreEqual(Method.GET, restRequest.Value.Method); Assert.That(restRequest.Value.Resource, Is.StringContaining("/calls/recordings/10")); Assert.That(restRequest.Value.Parameters, Has.Some.Matches <Parameter>(p => p.Name.Equals("fields") && p.Value.Equals(FIELDS))); }
public void GetCallRecordingByName() { string expectedJson = GetJsonPayload("/callstexts/callsApi/response/getCallRecording.json"); var restRequest = MockRestResponse(expectedJson); CallRecording callRecording = Client.CallsApi.GetCallRecordingByName(10, "testName", null); Assert.That(Serializer.Serialize(callRecording), Is.EqualTo(expectedJson)); Assert.AreEqual(Method.GET, restRequest.Value.Method); Assert.That(restRequest.Value.Parameters, Has.None.Matches <Parameter>(p => p.Name.Equals("fields") && p.Value.Equals(FIELDS))); Assert.That(restRequest.Value.Resource, Does.Contain("/10/recordings/testName")); }