public void AddEnrollment_ValidRequest_Ok() { var sut = GetSut(out Mock <IAddEnrollmentDomainService> addEnrollmentDomainServiceMock); addEnrollmentDomainServiceMock.Setup(x => x.Add(It.IsAny <EnrollmentRequest>())); var command = new AddEnrollmentCommand { Request = SharedMethods.GetEnrollmentRequest() }; Assert.DoesNotThrow(() => sut.Add(command)); addEnrollmentDomainServiceMock.Verify(x => x.Add(It.IsAny <EnrollmentRequest>())); }
public void Add(AddEnrollmentCommand command) { command.Request.Validate(); _addEnrollmentDomainService.Add(command.Request); }
public void Post([FromBody] AddEnrollmentCommand command) { _addEnrollmentAppService.Add(command); }