Example #1
0
        public void WhenCheckIsCalled_WithEmptyParams_CallsRequestRunnerWithCorrectUrlAndMethod()
        {
            var restRequestRunnerMock = new Mock <IRestRequestRunner>();

            var sut = new ChangesEndpoint(restRequestRunnerMock.Object);

            sut.CheckChange("1");

            RestRequestRunnerAssert.VerifyRequest <ChangeInfo>(restRequestRunnerMock, "/changes/1/check/?", Method.GET);
        }
Example #2
0
        public void WhenGetDraftCommentsIsCalled_WithEmptyParams_CallsRequestRunnerWithCorrectUrlAndMethod()
        {
            var restRequestRunnerMock = new Mock <IRestRequestRunner>();

            var sut = new ChangesEndpoint(restRequestRunnerMock.Object);

            sut.GetDraftComments("1");

            RestRequestRunnerAssert.VerifyRequest <Dictionary <string, List <CommentInfo> > >(restRequestRunnerMock, "/changes/1/drafts/?", Method.GET);
        }
Example #3
0
        public void WhenGetDetailsIsCalled_WithEmptyParams_CallsRequestRunnerWithCorrectUrlAndMethod()
        {
            var restRequestRunnerMock = new Mock <IRestRequestRunner>();

            var sut = new ChangesEndpoint(restRequestRunnerMock.Object);

            sut.GetDetails("1", ChangeQueryParameters.Empty, ChangeOptionalParameters.Empty);

            RestRequestRunnerAssert.VerifyRequest <ChangeInfo>(restRequestRunnerMock, "/changes/1/detail/?", Method.GET);
        }
Example #4
0
        public void WhenGetTopicIsCalled_WithEmptyParams_CallsRequestRunnerWithCorrectUrlAndMethod()
        {
            var restRequestRunnerMock = new Mock <IRestRequestRunner>();

            var sut = new ChangesEndpoint(restRequestRunnerMock.Object);

            sut.GetTopic("1");

            RestRequestRunnerAssert.VerifyRequest <string>(restRequestRunnerMock, "/changes/1/topic/?", Method.GET);
        }
        public void WhenGetRelatedChangesIsCalled_WithEmptyParams_CallsRequestRunnerWithCorrectUrlAndMethod()
        {
            var restRequestRunnerMock = new Mock <IRestRequestRunner>();

            var sut = new RevisionsEndpoint(restRequestRunnerMock.Object);

            sut.GetRelatedChanges("1", "2");

            RestRequestRunnerAssert.VerifyRequest <RelatedChangesInfo>(restRequestRunnerMock, "/changes/1/revisions/2/related", Method.GET);
        }