public Command BuildBaseCommand()
        {
            var command = new Command("base");
            var builder = new BaseRequestBuilder(PathParameters, RequestAdapter);

            command.AddCommand(builder.BuildGetCommand());
            return(command);
        }
Exemple #2
0
        public void BaseRequestBuilder()
        {
            var requestUrl = "https://localhost";
            var client     = new Mock <IBaseClient>().Object;

            var requestBuilder = new BaseRequestBuilder(requestUrl, client);

            Assert.Equal(requestUrl, requestBuilder.RequestUrl);
            Assert.Equal(client, requestBuilder.Client);
        }
        public void BaseRequestBuilder()
        {
            var requestUrl = "https://localhost";
            var client     = new Mock <IBaseClient>().Object;

            var requestBuilder = new BaseRequestBuilder(requestUrl, client);

            Assert.AreEqual(requestUrl, requestBuilder.RequestUrl, "Unexpected request URL initialized.");
            Assert.AreEqual(client, requestBuilder.Client, "Unexpected client initialized.");
        }
Exemple #4
0
        public void AppendSegmentToRequestUrl()
        {
            var requestUrl    = "https://localhost";
            var newUrlSegment = "segment";

            var requestBuilder = new BaseRequestBuilder(requestUrl, new Mock <IBaseClient>().Object);

            var appendedUrl = requestBuilder.AppendSegmentToRequestUrl(newUrlSegment);

            Assert.Equal(string.Join("/", requestUrl, newUrlSegment), appendedUrl);
        }