示例#1
0
        public void UniformSnapshot_CalculatesAMinOfZeroForAnEmptySnapshot()
        {
            IReservoirSnapshot snapshot = new UniformSnapshot(0, 0.0, Enumerable.Empty <long>());

            snapshot.Min.Should().Be(0);
        }
        public void UniformSnapshot_CalculatesAStdDevOfZeroForASingletonSnapshot()
        {
            IReservoirSnapshot snapshot = new UniformSnapshot(0, 0.0, new[] { 1L });

            snapshot.StdDev.Should().Be(0);
        }
        public void UniformSnapshot_CalculatesAMinOfZeroForAnEmptySnapshot()
        {
            Snapshot snapshot = new UniformSnapshot(0, new long[] { });

            snapshot.Min.Should().Be(0);
        }
        public void UniformSnapshot_CalculatesAStdDevOfZeroForAnEmptySnapshot()
        {
            ISnapshot snapshot = new UniformSnapshot(0, Enumerable.Empty <long>());

            snapshot.StdDev.Should().Be(0);
        }
        public void UniformSnapshot_CalculatesAStdDevOfZeroForASingletonSnapshot()
        {
            Snapshot snapshot = new UniformSnapshot(0, new long[] { 1 });

            snapshot.StdDev.Should().Be(0);
        }