public void ShouldThrowExceptionWhenServiceTypeRequestedDoesntExist() { // arrange StatsCheckerFactory factory = new StatsCheckerFactory(); ClientSetting setting = new ClientSetting { AssemblyName = "Rbi.Property.HealthMonitoring.Tests", FullQualifiedServiceName = "Rbi.Property.HealthMonitoring.Tests.StatsCheckers.DummyType" }; // act Assert.Throws<Exception>(() => factory.CreateStatsCheckerInstance(setting)); }
public void ShouldCreateBasicHttpCheckerWhenItsTypeIsRequested() { // arrange StatsCheckerFactory factory = new StatsCheckerFactory(); ClientSetting setting = new ClientSetting { AssemblyName = "Rbi.Property.HealthMonitoring", FullQualifiedServiceName = "Rbi.Property.HealthMonitoring.StatsCheckers.BasicHttpStatsChecker" }; // act IChecker actual = factory.CreateStatsCheckerInstance(setting); Assert.IsInstanceOf(typeof(BasicHttpStatsChecker), actual); }