예제 #1
0
        public void CreateKeyRangeOpenOpen()
        {
            var openOpen = KeyRange.OpenOpen(new Key(SpannerNumeric.Parse("0.1")), new Key(SpannerNumeric.Parse("100.1")));

            Assert.False(openOpen.BeginInclusive);
            Assert.False(openOpen.EndInclusive);
            Assert.Equal(new Key(SpannerNumeric.Parse("0.1")), openOpen.BeginAt);
            Assert.Equal(new Key(SpannerNumeric.Parse("100.1")), openOpen.End);
            Assert.Equal(new V1.KeyRange
            {
                StartOpen = new ListValue {
                    Values = { new [] { new Value {
                                            StringValue = "0.1"
                                        } } }
                },
                EndOpen = new ListValue {
                    Values = { new [] { new Value {
                                            StringValue = "100.1"
                                        } } }
                }
            }, openOpen.Protobuf);
        }