public void get_active_consumer_sessions_should_return_sessions() { _consumerService.GetActiveSessions().Returns(new[] { GetConsumerSession() }); var result = _rpc.ndm_getActiveConsumerSessions(); _consumerService.Received().GetActiveSessions(); result.Data.Should().ContainSingle(); var session = result.Data.Single(); VerifyConsumerSession(session); }
public ResultWrapper <ConsumerSessionForRpc[]> ndm_getActiveConsumerSessions() => ResultWrapper <ConsumerSessionForRpc[]> .Success(_consumerService.GetActiveSessions() .Select(s => new ConsumerSessionForRpc(s)).ToArray());