Esempio n. 1
0
        public NServiceBusHealthCheckTestsFixture()
        {
            HealthCheckContext = new HealthCheckContext
            {
                Registration = new HealthCheckRegistration("Foo", Mock.Of <IHealthCheck>(), null, null)
            };

            MessageSession         = new Mock <IMessageSession>();
            Logger                 = new Mock <ILogger <NServiceBusHealthCheck> >();
            NServiceBusHealthCheck = new NServiceBusHealthCheck(MessageSession.Object, Logger.Object);
        }
        public NServiceBusHealthCheckTestsFixture()
        {
            HealthCheckContext = new HealthCheckContext
            {
                Registration = new HealthCheckRegistration("Foo", Mock.Of <IHealthCheck>(), null, null)
            };

            Interval          = TimeSpan.FromMilliseconds(100);
            Timeout           = TimeSpan.FromMilliseconds(500);
            CancellationToken = new CancellationToken();
            MessageSession    = new Mock <IMessageSession>();
            DistributedCache  = new Mock <IDistributedCache>();

            HealthCheck = new NServiceBusHealthCheck(MessageSession.Object, DistributedCache.Object)
            {
                Interval = Interval,
                Timeout  = Timeout
            };

            Exception = new Exception("Foobar");
        }
Esempio n. 3
0
 public Task <HealthCheckResult> CheckHealthAsync()
 {
     return(NServiceBusHealthCheck.CheckHealthAsync(HealthCheckContext));
 }