AreValueEqual() public static méthode

public static AreValueEqual ( HistogramBase expected, HistogramBase actual ) : void
expected HistogramBase
actual HistogramBase
Résultat void
        public void Copy_retains_all_public_properties()
        {
            var source = Create(DefautltLowestDiscernibleValue, DefaultHighestTrackableValue, DefaultSignificantFigures);
            var copy   = source.Copy();

            HistogramAssert.AreValueEqual(source, copy);
        }
Exemple #2
0
        public void Given_a_Histogram_populated_with_full_range_of_values_When_encoded_and_decoded_with_compression_Then_data_is_preserved()
        {
            var source = Create(DefaultHighestTrackableValue, DefaultSignificantFigures);

            LoadFullRange(source);
            var result = CompressedEncodeDecode(source);

            HistogramAssert.AreValueEqual(source, result);
        }
Exemple #3
0
        public void Given_a_populated_Histogram_When_encoded_and_decoded_Then_data_is_preserved()
        {
            var source = Create(DefaultHighestTrackableValue, DefaultSignificantFigures);

            Load(source);
            var result = EncodeDecode(source);

            HistogramAssert.AreValueEqual(source, result);
        }
        private void CreateAndAdd(HistogramBase source)
        {
            source.RecordValueWithCount(1, 100);
            source.RecordValueWithCount(int.MaxValue - 1, 1000);

            var target = Create(source.LowestTrackableValue, source.HighestTrackableValue, source.NumberOfSignificantValueDigits);

            target.Add(source);

            HistogramAssert.AreValueEqual(source, target);
        }