public void WriteOperationShouldDelegateToOriginHistogram() { var copy = new Mock <IHistogram>(); var origin = new Mock <IHistogram>(); var histogram = new HistogramSnapshot(copy.Object, origin.Object); histogram.Reset(); origin.Verify(o => o.Reset(), Times.Once); }
public void ReadonlyOperationsShouldDelegateToReadonlyHistogram() { var copy = new Mock <IHistogram>(); var origin = new Mock <IHistogram>(); var histogram = new HistogramSnapshot(copy.Object, origin.Object); var max = histogram.Max; copy.Verify(c => c.Max, Times.Once); var mean = histogram.Mean; copy.Verify(c => c.Mean, Times.Once); var std = histogram.StdDeviation; copy.Verify(c => c.StdDeviation, Times.Once); var count = histogram.TotalCount; copy.Verify(c => c.TotalCount, Times.Once); histogram.GetValueAtPercentile(50); copy.Verify(c => c.GetValueAtPercentile(50), Times.Once); }