public void Verify_can_select_cluster_scanner() { ClusterSnapshot snapshot = new FakeClusterSnapshot1(); var result = _service.GetService <IScanner>() .Scan(snapshot); result.ScannerId.ShouldBe(typeof(ClusterScanner).GetIdentifier()); }
public void Verify_analyzers_fired() { ClusterSnapshot snapshot = new FakeClusterSnapshot1(); var result = new ClusterScanner(_probes) .Scan(snapshot); result.Count.ShouldBe(7); result.Count(x => x.Id == typeof(RuntimeProcessLimitProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(SocketDescriptorThrottlingProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(NetworkPartitionProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(MemoryAlarmProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(DiskAlarmProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(AvailableCpuCoresProbe).GetIdentifier()).ShouldBe(1); result.Count(x => x.Id == typeof(FileDescriptorThrottlingProbe).GetIdentifier()).ShouldBe(1); }