public void ValueTypeColumn_Basic()
        {
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <int>(-1), -5, 10);
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <ushort>(ushort.MaxValue), (ushort)7, (ushort)3);
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <DateTime>(DateTime.MinValue), DateTime.UtcNow, DateTime.UtcNow.AddDays(3));

            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <int>(-1, ArrayExtensions.MinimumSize + 1), -5, 10);
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <ushort>(ushort.MaxValue, ArrayExtensions.MinimumSize + 1), (ushort)7, (ushort)3);
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <DateTime>(DateTime.MinValue, ArrayExtensions.MinimumSize + 1), DateTime.UtcNow, DateTime.UtcNow.AddDays(3));

            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <int>(-1, ushort.MaxValue), -5, 10);
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <ushort>(ushort.MaxValue, ushort.MaxValue), (ushort)7, (ushort)3);
            ColumnTests.ColumnTest_Basics(() => new ValueTypeColumn <DateTime>(DateTime.MinValue, ushort.MaxValue), DateTime.UtcNow, DateTime.UtcNow.AddDays(3));
        }
        public void SortedColumn_Basic()
        {
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <int>(new ValueTypeColumn <int>(-1), 0), -10, 20);
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <ByteBlock>(new ByteBlockColumn(ByteBlock.Zero), 0), "One", "Two");
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <TimeSpan>(new ValueTypeColumn <TimeSpan>(default(TimeSpan)), 0), TimeSpan.FromMinutes(1), TimeSpan.FromHours(1));

            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <int>(new ValueTypeColumn <int>(-1), ArrayExtensions.MinimumSize + 1), -10, 20);
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <ByteBlock>(new ByteBlockColumn(ByteBlock.Zero), ArrayExtensions.MinimumSize + 1), "One", "Two");
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <TimeSpan>(new ValueTypeColumn <TimeSpan>(default(TimeSpan)), ArrayExtensions.MinimumSize + 1), TimeSpan.FromMinutes(1), TimeSpan.FromHours(1));

            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <int>(new ValueTypeColumn <int>(-1), ushort.MaxValue), -10, 20);
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <ByteBlock>(new ByteBlockColumn(ByteBlock.Zero), ushort.MaxValue), "One", "Two");
            ColumnTests.ColumnTest_Basics(() => ColumnFactory.CreateSortedColumn <TimeSpan>(new ValueTypeColumn <TimeSpan>(default(TimeSpan)), ushort.MaxValue), TimeSpan.FromMinutes(1), TimeSpan.FromHours(1));
        }
 public void IpRangeColumn_Basic()
 {
     // Test the IP Range column with two distinct, valid sample values
     ColumnTests.ColumnTest_Basics(() => new IpRangeColumn(), "10.11.0.0", "192.168.100.0-192.168.103.255");
 }
 public void ByteBlockColumn_Basic()
 {
     ColumnTests.ColumnTest_Basics(() => new ByteBlockColumn(@"\"), "Hello", "There");
 }
Example #5
0
 public void IndexedColumn_Basic()
 {
     ColumnTests.ColumnTest_Basics(() => new IndexedColumn(ColumnFactory.CreateSortedColumn <ByteBlock>(new ByteBlockColumn(ByteBlock.Zero), 0), new DefaultWordSplitter()), "One", "Two");
 }