public async Task When_Registration_Then_Response_Accepted(RegistrationCommandModel model) { // Act var response = await sut.Registration(model); // Assert response.Should().BeOfType <AcceptedResult>(); }
public async Task When_Registration_Then_Send_Registration_Command_Model_With_Bus( RegistrationCommandModel model) { // Act await sut.Registration(model); // Assert busMock.Verify(x => x.SendAsync(It.IsAny <RegistrationCommandModel>(), default), Times.Once); }
public async Task <IActionResult> Registration(RegistrationCommandModel model) { await bus.SendAsync(model); return(Accepted()); }