public async Task <OffBoardUserDTO> GetOffBoardingPermissionsById(Guid id) { var query = new GetOffboardUserPermissionsQuery(id); var result = _queryProcessor.Process(query); return(await result); }
public async void given_getoffboarduserpermissionsquery_queryprocessor_should_get_same_query_created_in_controller() { //Assemble var mockAgg = new UserControllerMockAggregate(); var id = new Guid(); var query = new GetOffboardUserPermissionsQuery(id); mockAgg.setup_processor_to_verify_getUserOffboardingQueries_are_the_same(); var controller = mockAgg.CreateUserController(); //Apply var result = await controller.GetOffBoardingPermissionsById(id); //Assert //Assert.Equal(query, mockAgg.PermissionQuery); Assert.IsType <OffBoardUserDTO>(result); }