public void TestCreateChildrenShouldReturnLeafIfChildValueStartsWithParentValue()
        {
            var column = new ColumnBuilder().WithValue("Apple").Build();
            var node   = new StringFilterTreeNode(string.Empty, column, string.Empty, 1);
            var result = node.CreateChildren();

            Assert.That(result.First().Name, Is.EqualTo("Apple"));
        }
        public void TestCreateChildrenShouldNotReturnLeafIfChildValueDoesNotStartWithParentValue()
        {
            var column = new ColumnBuilder().WithValue("Apple").Build();
            var node   = new StringFilterTreeNode(string.Empty, column, "B", 1);
            var result = node.CreateChildren();

            Assert.That(result.Count(), Is.EqualTo(0));
        }
        public void TestCreateChildrenShouldCreateMinValueNode()
        {
            var values = CreateValues((char)32, 20);
            var column = new ColumnBuilder().WithValues(values).Build();
            var node   = new StringFilterTreeNode(string.Empty, column, string.Empty, 1);
            var result = node.CreateChildren();

            Assert.That(result.First().Name, Is.EqualTo(((char)32).ToString()));
        }
        public void TestCreateChildrenShouldReturnNodesIfMoreThanTenNodes()
        {
            var values = CreateValues(20);
            var column = new ColumnBuilder().WithValues(values).Build();
            var node   = new StringFilterTreeNode(string.Empty, column, string.Empty, 1);
            var result = node.CreateChildren();

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