public void ShouldStoreTwoRecord(
            int pageSize)
        {
            var tree = new BplusTree(pageSize);

            var customer01 = CreateCustomer(100);

            tree.Insert(customer01);

            var cusomter02 = CreateCustomer(101);

            tree.Insert(cusomter02);

            var customers = tree.GetAll();

            customers.Should().HaveCount(2);

            customers[0].CustomerId.Should().Be(100);
            customers[0].Name.Should().Be(customer01.Name);

            customers[1].CustomerId.Should().Be(101);
            customers[1].Name.Should().Be(cusomter02.Name);

            var stringVersion = tree.GetStringVersion();

            stringVersion.Should().Be("P:100|P:101");
        }
        public void ShouldStoreThreeRecordsOutOfOrder2(
            int pageSize)
        {
            var tree = new BplusTree(pageSize);

            var cusomter03 = CreateCustomer(102);

            tree.Insert(cusomter03);

            var cusomter02 = CreateCustomer(101);

            tree.Insert(cusomter02);

            var customer01 = CreateCustomer(100);

            tree.Insert(customer01);

            var customers = tree.GetAll();

            customers.Should().HaveCount(3);

            customers[0].CustomerId.Should().Be(100);
            customers[1].CustomerId.Should().Be(101);
            customers[2].CustomerId.Should().Be(102);
        }
        public void Test910(
            int pageSize)
        {
            var tree = new BplusTree(pageSize);

            var customer01 = CreateCustomer(100);

            tree.Insert(customer01);

            var cusomter02 = CreateCustomer(110);

            tree.Insert(cusomter02);

            var cusomter03 = CreateCustomer(120);

            tree.Insert(cusomter03);

            var cusomter04 = CreateCustomer(105);

            tree.Insert(cusomter04);

            var cusomter05 = CreateCustomer(130);

            tree.Insert(cusomter05);

            var customers = tree.GetAll();

            customers.Should().HaveCount(5);

            customers[0].CustomerId.Should().Be(100);
            customers[1].CustomerId.Should().Be(105);
            customers[2].CustomerId.Should().Be(110);
            customers[3].CustomerId.Should().Be(120);
            customers[4].CustomerId.Should().Be(130);
        }
        public void ShouldNotErrorWithZeroRecords(
            int pageSize)
        {
            var tree = new BplusTree(pageSize);

            var customers = tree.GetAll();

            customers.Should().HaveCount(0);

            var stringVersion = tree.GetStringVersion();

            stringVersion.Should().BeEmpty();
        }
        public void ShouldStoreSingleRecord(
            int pageSize)
        {
            var tree = new BplusTree(pageSize);

            var customerRecord = CreateCustomer(100);

            tree.Insert(customerRecord);

            var customers = tree.GetAll();

            customers.Should().HaveCount(1);

            customers[0].CustomerId.Should().Be(100);
            customers[0].Name.Should().Be(customerRecord.Name);

            var stringVersion = tree.GetStringVersion();

            stringVersion.Should().Be("P:100");
        }