Beispiel #1
0
        public void TestKeyRangeToStringPrefix()
        {
            var    keyrange = new KeyRange <string>(Key <string> .CreateKey("3", true), Key <string> .CreatePrefixKey("4"));
            string s        = keyrange.ToString();

            Assert.IsNotNull(s);
            Assert.AreNotEqual(s, String.Empty);
            StringAssert.Contains(s, "3");
            StringAssert.Contains(s, "4");
            StringAssert.Contains(s, "prefix");
        }
Beispiel #2
0
        public void TestKeyRangeToStringExclusive()
        {
            var    keyrange = new KeyRange <int>(Key <int> .CreateKey(1, false), Key <int> .CreateKey(2, false));
            string s        = keyrange.ToString();

            Assert.IsNotNull(s);
            Assert.AreNotEqual(s, String.Empty);
            StringAssert.Contains(s, "1");
            StringAssert.Contains(s, "2");
            StringAssert.Contains(s, "exclusive");
        }
Beispiel #3
0
        public void TestKeyRangeToStringInclusive()
        {
            var    keyrange = new KeyRange <int>(Key <int> .CreateKey(3, true), Key <int> .CreateKey(4, true));
            string s        = keyrange.ToString();

            Assert.IsNotNull(s);
            Assert.AreNotEqual(s, String.Empty);
            StringAssert.Contains(s, "3");
            StringAssert.Contains(s, "4");
            StringAssert.Contains(s, "inclusive");
        }
Beispiel #4
0
 // TODO: Use ScanTokenPB to generate ToString()
 public override string ToString() => _keyRange.ToString();