public async Task <IActionResult> GetEventConsumers() { var entities = await eventConsumerManagerGrain.GetConsumersAsync(); var response = entities.Value.Select(EventConsumerDto.FromEventConsumerInfo).ToList(); return(Ok(response)); }
public async Task <IActionResult> GetEventConsumers() { var entities = await eventConsumerManagerGrain.GetConsumersAsync(); var models = entities.Value.Select(x => SimpleMapper.Map(x, new EventConsumerDto())).ToList(); return(Ok(models)); }
public EventConsumersHealthCheckTests() { A.CallTo(() => grainFactory.GetGrain <IEventConsumerManagerGrain>(SingleGrain.Id, null)) .Returns(eventConsumerManager); A.CallTo(() => eventConsumerManager.GetConsumersAsync()) .Returns(consumers.AsImmutable()); sut = new EventConsumersHealthCheck(grainFactory); }