CallfireApiClient.Tests.Api.Campaigns.TextBroadcastsApiTest.GetBatches C# (CSharp) Method

GetBatches() private method

private GetBatches ( ) : void
return void
        public void GetBatches()
        {
            var expectedJson = GetJsonPayload("/campaigns/textBroadcastsApi/response/getBatches.json");
            var restRequest = MockRestResponse(expectedJson);

            var request = new GetByIdRequest
            {
                Offset = 0,
                Fields = FIELDS,
                Id = 11
            };
            var batches = Client.TextBroadcastsApi.GetBatches(request);
            Assert.That(Serializer.Serialize(batches), Is.EqualTo(expectedJson));

            Assert.AreEqual(Method.GET, restRequest.Value.Method);
            var requestBodyParam = restRequest.Value.Parameters.FirstOrDefault(p => p.Type == ParameterType.RequestBody);
            Assert.IsNull(requestBodyParam);
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("offset") && p.Value.Equals("0")));
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("fields") && p.Value.Equals(FIELDS)));
            Assert.That(restRequest.Value.Parameters, Has.No.Some.Matches<Parameter>(p => p.Name.Equals("id")));
            Assert.That(restRequest.Value.Resource, Is.StringEnding("/11/batches"));
        }