private void AssertCacheMonitorCallCounters(CacheMonitorCounters totalCacheMonitorCallCounters) { Assert.True(totalCacheMonitorCallCounters.TrackCachePressureMonitorStatusChangeCallCounter > 0); Assert.True(totalCacheMonitorCallCounters.TrackMemoryAllocatedCallCounter > 0); Assert.Equal(0, totalCacheMonitorCallCounters.TrackMemoryReleasedCallCounter); Assert.True(totalCacheMonitorCallCounters.TrackMessageAddedCounter > 0); Assert.Equal(0, totalCacheMonitorCallCounters.TrackMessagePurgedCounter); }
private void AssertCacheMonitorCallCounters(CacheMonitorCounters totalCacheMonitorCallCounters) { var c = totalCacheMonitorCallCounters; Assert.True(c.TrackCachePressureMonitorStatusChangeCallCounter > 0, $"Expected {nameof(c.TrackCachePressureMonitorStatusChangeCallCounter)} > 0, got {c.TrackCachePressureMonitorStatusChangeCallCounter}"); Assert.True(c.TrackMemoryAllocatedCallCounter > 0, $"Expected {nameof(c.TrackMemoryAllocatedCallCounter)} > 0, got {c.TrackMemoryAllocatedCallCounter}"); Assert.True(0 == c.TrackMemoryReleasedCallCounter, $"Expected {nameof(c.TrackMemoryReleasedCallCounter)} == 0, got {c.TrackMemoryReleasedCallCounter}"); Assert.True(c.TrackMessageAddedCounter > 0, $"Expected {nameof(c.TrackMessageAddedCounter)} > 0, got {c.TrackMessageAddedCounter}"); Assert.True(0 == c.TrackMessagePurgedCounter, $"Expected {nameof(c.TrackMessagePurgedCounter)} == 0, got {c.TrackMessagePurgedCounter}"); }
private CacheMonitorForTesting(EventHubCacheMonitorDimensions dimensions, Logger logger) { this.CallCounters = new CacheMonitorCounters(); this.logger = logger; }
private CacheMonitorForTesting() { this.CallCounters = new CacheMonitorCounters(); }