CallfireApiClient.Tests.Api.Numbers.NumberLeasesApiTest.FindConfigs C# (CSharp) Method

FindConfigs() private method

private FindConfigs ( ) : void
return void
        public void FindConfigs()
        {
            var expectedJson = GetJsonPayload("/numbers/numberLeasesApi/response/findNumberLeaseConfigs.json");
            var restRequest = MockRestResponse(expectedJson);

            var request = new FindNumberLeaseConfigsRequest
            {
                Limit = 5,
                Offset = 0,
                State = "LA",
                LabelName = "label"
            };
            var configs = Client.NumberLeasesApi.FindConfigs(request);
            Assert.That(Serializer.Serialize(configs), 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("limit") && p.Value.Equals("5")));
            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("state") && p.Value.Equals("LA")));
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("labelName") && p.Value.Equals("label")));
        }