Exemple #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");
        }
Exemple #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");
        }
Exemple #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");
        }
Exemple #4
0
 // TODO: Use ScanTokenPB to generate ToString()
 public override string ToString() => _keyRange.ToString();