public RegisterMonitorType ( string monitorType ) : void | ||
monitorType | string | |
return | void |
public void RegisterMonitorType_should_register_new_types_and_ignore_currently_existing_ones() { _repository.Setup(r => r.LoadMonitorTypes()).Returns(new[] { "abc" }); var registry = new HealthMonitorTypeRegistry(_repository.Object); Assert.Equal(new[] { "abc", HealthMonitorTypeRegistry.PushMonitorType }, registry.GetMonitorTypes().OrderBy(t => t)); registry.RegisterMonitorType("def"); registry.RegisterMonitorType("abc"); registry.RegisterMonitorType("ghi"); Assert.Equal(new[] { "abc", "def", "ghi", HealthMonitorTypeRegistry.PushMonitorType }, registry.GetMonitorTypes().OrderBy(t => t)); }
public void GetMonitorTypes_should_return_all_currently_registered_monitors() { _repository.Setup(r => r.LoadMonitorTypes()).Returns(new[] { "abc", "def" }); var registry = new HealthMonitorTypeRegistry(_repository.Object); registry.RegisterMonitorType("ghi"); Assert.Equal(new[] { "abc", "def", "ghi", HealthMonitorTypeRegistry.PushMonitorType }, registry.GetMonitorTypes().OrderBy(t => t)); }