public void NegotiateListMergeRequestParametersReturnsFailureForUnknownState( ListMergesOptions options, string defaultProject, string unknownState) { options.State = unknownState; var sut = new MergeRequestsParametersNegotiator(); sut.NegotiateListMergeRequestsParameters(options, defaultProject).IsFailure.Should().BeTrue(); }
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); }
public Result <ListMergesParameters> NegotiateListMergesParameters(ListMergesOptions options) { return(_mergesParametersNegotiator.NegotiateListMergeRequestsParameters(options, _appSettings.DefaultProject)); }