public void Verify_can_select_broker_queues_scanner() { BrokerQueuesSnapshot snapshot = new FakeBrokerQueuesSnapshot1(1); var result = _service.GetService <IScanner>() .Scan(snapshot); result.ScannerId.ShouldBe(typeof(BrokerQueuesScanner).GetIdentifier()); }
public void Verify_does_not_throw_when_scanner_not_found() { BrokerQueuesSnapshot snapshot = new FakeBrokerQueuesSnapshot1(1); IScannerFactory factory = new FakeScannerFactory(); IScanner result = new Scanner(factory); var report = result.Scan(snapshot); report.ScannerId.ShouldBe(typeof(NoOpScanner <EmptySnapshot>).GetIdentifier()); report.ShouldBe(DiagnosticCache.EmptyScannerResult); }
public void Verify_analyzers_fired() { BrokerQueuesSnapshot snapshot = new FakeBrokerQueuesSnapshot1(1); var result = new BrokerQueuesScanner(_probes) .Scan(snapshot); result.Count.ShouldBe(8); result.Count(x => x.Id == typeof(QueueGrowthProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(MessagePagingProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(RedeliveredMessagesProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(ConsumerUtilizationProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(UnroutableMessageProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(QueueLowFlowProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(QueueNoFlowProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(QueueHighFlowProbe).GetIdentifier()).ShouldBe(1); }