public Command BuildBaseCommand() { var command = new Command("base"); var builder = new BaseRequestBuilder(PathParameters, RequestAdapter); command.AddCommand(builder.BuildGetCommand()); return(command); }
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."); }
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); }