public void HappyPath()
        {
            ISwimProtocolProvider protocolProvider = new SwimProtocolProvider(null, _output);

            var loggerFactory = new LoggerFactory();

            loggerFactory.AddProvider(new XunitLoggerProvider(_output));

            var swimProtocol = new FailureDetection(protocolProvider, _configuration, loggerFactory.CreateLogger <FailureDetection>());

            swimProtocol.OnTransitioned((action) =>
            {
                _output.WriteLine($"{action.Source} => {action.Trigger} => {action.Destination}");
            });

            swimProtocol.Fire(SwimFailureDetectionTrigger.Ping);
            Assert.Equal(SwimFailureDetectionState.Pinged, swimProtocol.State);

            swimProtocol.Fire(SwimFailureDetectionTrigger.PingExpireLive);
            Assert.Equal(SwimFailureDetectionState.Alive, swimProtocol.State);

            swimProtocol.Fire(SwimFailureDetectionTrigger.ProtocolExpireLive);
            Assert.Equal(SwimFailureDetectionState.Expired, swimProtocol.State);

            swimProtocol.Fire(SwimFailureDetectionTrigger.Reset);
            Assert.Equal(SwimFailureDetectionState.Idle, swimProtocol.State);
        }
 public static FailureDetection GenerateFailureDetection(SwimProtocolProvider provider, IConfiguration configuration, ILogger <FailureDetection> logger)
 {
     return(new FailureDetection(provider, configuration, logger));
 }