public async void ShouldGetAllCorrectly() { var mediatorMock = new Mock <IMediator>(); var controller = new RecipeController(mediatorMock.Object); await controller.GetAll(); mediatorMock.Verify(x => x.Send(It.IsAny <GetRecipes>(), It.IsAny <CancellationToken>()), Times.Once); mediatorMock.VerifyNoOtherCalls(); }