public void StoreAspProgressNoSession_returns_exception_from_query_and_progress_validation() { // Given A.CallTo( () => storeAspService.GetProgressAndValidateCommonInputsForStoreAspProgressEndpoints( A <int?> ._, A <int?> ._, A <int?> ._, A <int?> ._, A <int?> ._, A <int?> ._, A <int?> ._ ) ).Returns((TrackerEndpointResponse.StoreAspProgressException, null)); // When var result = trackerActionService.StoreAspProgressNoSession( DefaultProgressId, DefaultCustomisationVersion, DefaultLmGvSectionRow, DefaultTutorialId, DefaultTutorialTime, DefaultTutorialStatus, DefaultDelegateId, DefaultCustomisationId, DefaultSessionId.ToString() ); // Then result.Should().Be(TrackerEndpointResponse.StoreAspProgressException); A.CallTo( () => storeAspService.StoreAspProgressAndSendEmailIfComplete( A <DetailedCourseProgress> ._, A <int> ._, A <string?> ._, A <int> ._, A <int> ._, A <int> ._ ) ).MustNotHaveHappened(); }
public void ProcessQuery_with_StoreAspProgressNoSession_action_passes_query_params() { // Given var query = defaultStoreAspProgressQueryParams; query.Action = "StoreAspProgressNoSession"; var expectedResponse = TrackerEndpointResponse.Success; A.CallTo( () => actionService.StoreAspProgressNoSession( A <int> ._, A <int> ._, A <string> ._, A <int> ._, A <int> ._, A <int> ._, A <int> ._, A <int> ._, A <string> ._ ) ).Returns(expectedResponse); // When var result = trackerService.ProcessQuery(query, sessionVariablesForStoreAspProgressNoSession); // Then result.Should().Be(expectedResponse); A.CallTo( () => actionService.StoreAspProgressNoSession( query.ProgressId !.Value, query.Version !.Value, DefaultProgressText, query.TutorialId !.Value, query.TutorialTime !.Value, query.TutorialStatus !.Value, query.CandidateId !.Value, query.CustomisationId !.Value, DefaultSessionId ) ) .MustHaveHappenedOnceExactly(); }