public async Task ThenTheCOmmandIsValidated() { var command = new CreateApprenticeshipUpdateCommand { ApprenticeshipUpdate = new ApprenticeshipUpdate(), EmployerId = 321, UserId = "Tester" }; await _handler.Handle(command); _validator.Verify(m => m.Validate(It.IsAny <CreateApprenticeshipUpdateCommand>()), Times.Once()); }
public async Task ThenTheRequestIsValidated() { //Arrange var command = new CreateApprenticeshipUpdateCommand { Caller = new Caller(1, CallerType.Employer), ApprenticeshipUpdate = new ApprenticeshipUpdate() }; //Act await _handler.Handle(command); //Assert _validator.Verify(x => x.Validate(It.IsAny <CreateApprenticeshipUpdateCommand>()), Times.Once); }