private void unavailable(Alert alert) { var monitor = Substitute.For <IMonitor>(); monitor.Availability().Returns(Availability.Down(alert)); instance_monitor = monitor; }
private void dependency_1_has_instance_unavailability() { service_dependency_1.Monitor.Availability().Returns( Availability.Up() | Availability.Up() | Availability.Down(AlertFactory.InstanceUnavailable(Fake.AnInstanceMonitor.Info, "Ooops")) ); service_dependencies.Add(service_dependency_1); }
private void monitor_has_reduced_service() { startup.SetMonitorAvailability(Availability.Up() | Availability.Down(alert)); }
private void monitor_has_no_service() { startup.SetMonitorAvailability(Availability.Down(alert)); }
public void it_is_not_available() { var expected_availability = Availability.Down(AlertFactory.ServiceUnavailable(info, "Remote service is down.")); the_availability.Status.should_be(expected_availability.Status); }