public void CreateClientWrapperParameters_IfSerializerIsNotSet_ReturnsParametersWithInitializedRequestDataFormatAsJson()
        {
            var builder = new ApiRestClientBuilder();

            var actual = builder.CreateClientWrapperParameters(It.IsAny <ApiContext>(), It.IsAny <string>(), new ExecuteApiRequestParameters());

            Assert.AreEqual(DataFormat.Json, actual.RequestDataFormat);
        }
        public void CreateClientWrapperParameters_ReturnsParametersWithInitializedHeaders(ApiContext context, Dictionary <string, string> expected)
        {
            var builder = new ApiRestClientBuilder();

            var actual = builder.CreateClientWrapperParameters(context, It.IsAny <string>(), new ExecuteApiRequestParameters());

            AssertExtension.AreObjectsValuesEqual(expected, actual.RequestHeaders);
        }
        public void CreateClientWrapperParameters_ReturnsParametersWithInitializedBaseUrl(string baseUrl)
        {
            var builder = new ApiRestClientBuilder();

            var actual = builder.CreateClientWrapperParameters(It.IsAny <ApiContext>(), baseUrl, new ExecuteApiRequestParameters());

            Assert.AreEqual(baseUrl, actual.BaseUrl);
        }
        public void CreateClientWrapperParameters_ReturnsParametersWithInitializedBaseProperties(ExecuteApiRequestParameters parameters)
        {
            var builder = new ApiRestClientBuilder();

            var actual = builder.CreateClientWrapperParameters(It.IsAny <ApiContext>(), It.IsAny <string>(), parameters);

            Assert.AreEqual(parameters.Endpoint, actual.RequestUrl);
            Assert.AreEqual(parameters.Method, actual.RequestMethod);
            Assert.AreEqual(parameters.Body, actual.RequestBody);
        }
        public void CreateClientWrapperParameters_IfSerializerIsSet_ReturnsParametersWithInitializedSerializerAndRequestDataFormat(
            ExecuteApiRequestParameters parameters,
            ISerializer expectedSerializer,
            DataFormat expectedDataFormat)
        {
            var builder = new ApiRestClientBuilder();

            var actual = builder.CreateClientWrapperParameters(It.IsAny <ApiContext>(), It.IsAny <string>(), parameters);

            AssertExtension.AreObjectsValuesEqual(expectedSerializer, actual.RequestDataSerializer);
            Assert.AreEqual(expectedDataFormat, actual.RequestDataFormat);
        }