public void CreateByUri_Should_InvokeConsumerGroupRepositoryCreate_Once() { ConsumerGroup outParam; _consumerGroupService.Create(_consumerGroupDto); _mockConsumerGroupRepository.Verify(x => x.TryGetOne(_consumerGroupDto.Uri, out outParam), Times.Once); _mockConsumerGroupRepository.Verify(x => x.Create(It.IsAny <ConsumerGroup>()), Times.Once); }
public IActionResult Create([FromBody] ConsumerGroupDto dto) { var cgEntity = _consumerGroupService.Create(dto); return(Created($"api/consumergroups", cgEntity)); }