Esempio n. 1
0
        public void Bin()
        {
            double[]   data       = { 2, 14, 16, 28, 30, 32, 92 };
            Calculator calculator = new Calculator(data);

            double[][] expected = new double[][] {
                new double[] { 2 },
                new double[] { 14, 16 },
                new double[] { 28 },
                new double[] { 30, 32 },
                new double[] {},
                new double[] {},
                new double[] {},
                new double[] {},
                new double[] {},
                new double[] { 92 }
            };
            const int BIN_START    = 0;
            const int BIN_END      = 100;
            const int BIN_INTERVAL = 10;
            var       actual       = calculator.Bin(BIN_START, BIN_END, BIN_INTERVAL);

            Assert.AreEqual(expected, actual);
        }