CallfireApiClient.Tests.Api.Campaigns.BatchesApiTest.Get C# (CSharp) Method

Get() private method

private Get ( ) : void
return void
        public void Get()
        {
            string expectedJson = GetJsonPayload("/campaigns/batchesApi/response/getBatch.json");
            var restRequest = MockRestResponse(expectedJson);

            Batch batch = Client.BatchesApi.Get(11L, FIELDS);
            Assert.That(Serializer.Serialize(batch), Is.EqualTo(expectedJson));
            Assert.AreEqual(Method.GET, restRequest.Value.Method);
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("fields") && p.Value.Equals(FIELDS)));

            Client.BatchesApi.Get(11L);
            Assert.That(restRequest.Value.Parameters, Has.No.Some.Matches<Parameter>(p => p.Name.Equals("fields") && p.Value.Equals(FIELDS)));
        }