public void Create_StateMonthMatrices()
        {
            // Arrange
            var createStateMonthMatricesRequestModel = new StateRegionsRequest();

            _mediator
            .Setup(x => x.Send(It.IsAny <Create.Command>(), new CancellationToken()))
            .ReturnsAsync(new Unit());
            var stateRegionsController = new StateRegionsController(_mediator.Object);

            // Act
            var result = stateRegionsController.Create(createStateMonthMatricesRequestModel);

            // Assert
            Assert.IsType <Task <ActionResult <Unit> > >(result);
        }
Beispiel #2
0
 public async Task <ActionResult <Unit> > Create(StateRegionsRequest stateRegionsRequest)
 {
     return(await _mediator.Send(new Create.Command {
         StateRegions = stateRegionsRequest.stateRegions
     }));
 }