Example #1
0
        public void ToStringKeySetFromRanges()
        {
            var ranges = KeySet.FromRanges(
                KeyRange.ClosedOpen(new Key("beginKeyPart1", "beginKeyPart2"), new Key("endKeyPart1", "endKeyPart2")), KeyRange.ClosedClosed(new Key(1L), new Key(2L)));

            Assert.Equal("KeySet {Ranges = [[[ \"beginKeyPart1\", \"beginKeyPart2\" ], [ \"endKeyPart1\", \"endKeyPart2\" ]), [[ \"1\" ], [ \"2\" ]]]}", ranges.ToString());
        }
Example #2
0
        public void CreateKeySetFromRanges()
        {
            var ranges = KeySet.FromRanges(
                KeyRange.ClosedOpen(new Key("begin"), new Key("end")), KeyRange.ClosedClosed(new Key(1L), new Key(2L)));

            Assert.Collection(ranges.Ranges,
                              range => Assert.Equal(KeyRange.ClosedOpen(new Key("begin"), new Key("end")), range),
                              range => Assert.Equal(KeyRange.ClosedClosed(new Key(1L), new Key(2L)), range)
                              );
        }