Ejemplo n.º 1
0
        public void WhenGetAllIsCalled_WithEmptyParams_CallsRequestRunnerWithCorrectUrlAndMethod()
        {
            var restRequestRunnerMock = new Mock <IRestRequestRunner>();

            var sut = new ChangesEndpoint(restRequestRunnerMock.Object);

            sut.GetAll(ChangeQueryParameters.Empty, ChangeOptionalParameters.Empty);

            RestRequestRunnerAssert.VerifyRequest <List <ChangeInfo> >(restRequestRunnerMock, "/changes/?", Method.GET);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var gerritConfiguration = new GerritConfiguration("username", "password", "gerrit url");
            var changesEndPoint     = new ChangesEndpoint(gerritConfiguration);

            foreach (var change in changesEndPoint.GetAll(new ChangeQueryParameters {
                NumberOfResults = 10
            }, ChangeOptionalParameters.Empty))
            {
                Console.WriteLine(change.Subject);
            }
        }