Ejemplo n.º 1
0
        public void BindLiteralShouldReturnTimeOfDayValue()
        {
            var          value  = new TimeOfDay(10, 15, 5, 20);
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(value)) as ConstantNode;

            result.Value.Should().Be(value);
        }
Ejemplo n.º 2
0
        public void BindLiteralShouldReturnQueryNode()
        {
            var          value  = GeometryPoint.Create(5, 2);
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(value)) as ConstantNode;

            result.Value.Should().Be(value);
        }
Ejemplo n.º 3
0
        public void BindLiteralShouldReturnDateValue()
        {
            var          value  = new Date(2012, 12, 2);
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(value)) as ConstantNode;

            result.Value.Should().Be(value);
        }
Ejemplo n.º 4
0
        public void BindLiteralShouldReturnDateTimeOffsetValue()
        {
            var          value  = new DateTimeOffset(2012, 12, 2, 3, 34, 20, 0, new TimeSpan(2, 0, 0));
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(value)) as ConstantNode;

            result.Value.Should().Be(value);
        }
Ejemplo n.º 5
0
        public void BindLiteralShouldSetLiteralTextFromToken()
        {
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(1, "originalText")) as ConstantNode;

            result.LiteralText.Should().Be("originalText");
        }
Ejemplo n.º 6
0
        public void BindLiteralShouldReturnIntValue()
        {
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(5)) as ConstantNode;

            result.Value.Should().Be(5);
        }
Ejemplo n.º 7
0
        public void BindLiteralShouldSetLiteralTextFromToken()
        {
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(1, "originalText")) as ConstantNode;

            Assert.Equal("originalText", result.LiteralText);
        }
Ejemplo n.º 8
0
        public void BindLiteralShouldReturnIntValue()
        {
            ConstantNode result = LiteralBinder.BindLiteral(new LiteralToken(5)) as ConstantNode;

            Assert.Equal(5, result.Value);
        }