public void TestCreateChildrenShouldCreateMidValueNodes()
        {
            var values = CreateValues(-10, 20, 1);;

            _column = new ColumnBuilder().WithValues(values).Build();
            _node   = new IntegerFilterTreeNode(string.Empty, _column, (int)_column.Min, (int)_column.Max);
            var results = _node.CreateChildren();

            Assert.That(results.ElementAt(5).Name, Is.EqualTo("0 - 1"));
        }
        public void TestCreateChildrenShouldCreateMaxValueLeaf()
        {
            var value = int.MaxValue;

            _column = new ColumnBuilder().WithValue(value).Build();
            _node   = new IntegerFilterTreeNode(string.Empty, _column, value, value);
            var results = _node.CreateChildren();

            Assert.That(results.Single().Name, Is.EqualTo("2147483647"));
        }
        public void TestCreateChildrenShouldCreateMinValueNodes()
        {
            var values = CreateValues(int.MinValue, 20, 1);;

            _column = new ColumnBuilder().WithValues(values).Build();
            _node   = new IntegerFilterTreeNode(string.Empty, _column, (int)_column.Min, (int)_column.Max);
            var results = _node.CreateChildren();

            Assert.That(results.First().Name, Is.EqualTo("-2147483648 - -2147483647"));
        }
        public void TestCreateChildrenShouldReturnNodesIfMoreThanTenNodes()
        {
            var values = CreateValues(0, 20, 1);

            _column = new ColumnBuilder().WithValues(values).Build();
            _node   = new IntegerFilterTreeNode(string.Empty, _column, 0, 20);
            var result = _node.CreateChildren();

            Assert.That(result.All(p => p is IntegerFilterTreeNode));
        }