示例#1
0
        public void NegotiateListMergeRequestParametersReturnsFailureForUnknownState(
            ListMergesOptions options,
            string defaultProject,
            string unknownState)
        {
            options.State = unknownState;

            var sut = new MergeRequestsParametersNegotiator();

            sut.NegotiateListMergeRequestsParameters(options, defaultProject).IsFailure.Should().BeTrue();
        }
示例#2
0
        public void NegotiateListMergeRequestParametersCreatesParametersFromOptions(ListMergesOptions options, string defaultProject)
        {
            options.State = "opened";

            var sut = new MergeRequestsParametersNegotiator();

            sut.NegotiateListMergeRequestsParameters(options, defaultProject).Value.Should().Match <ListMergesParameters>(o =>
                                                                                                                          o.State == MergeRequestState.Opened &&
                                                                                                                          o.Assignee == options.Assignee &&
                                                                                                                          o.AssignedToCurrentUser == options.AssignedToMe &&
                                                                                                                          o.Project == options.Project);
        }
示例#3
0
 public Result <ListMergesParameters> NegotiateListMergesParameters(ListMergesOptions options)
 {
     return(_mergesParametersNegotiator.NegotiateListMergeRequestsParameters(options, _appSettings.DefaultProject));
 }