public void ShouldBuildStronglyTypedStringStartsWithFilter()
        {
            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(x => x.RowKey).StartsWith("abc");
            builder.Build().ShouldBe("(RowKey ge 'abc') and (RowKey lt 'abd')");
        }
        public void ShouldBuildStronglyTypedNotEqualsFilter()
        {
            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.RowKey).NotEquals("xyz");
            builder
            .Build()
            .ShouldBe("RowKey ne 'xyz'");
        }
        public void ShouldBuildStronglyTypedBoolFilter()
        {
            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Bool).Equals(true);
            builder
            .Build()
            .ShouldBe("Bool eq true");
        }
        public void ShouldBuildStronglyTypedLessThanFilter()
        {
            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.RowKey).LessThan("xyz");
            builder
            .Build()
            .ShouldBe("RowKey lt 'xyz'");
        }
        public void ShouldBuildStronglyTypedLongFilter()
        {
            var value       = long.MaxValue;
            var valueString = $"{value}L";

            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Long).Equals(value);
            builder
            .Build()
            .ShouldBe($"Long eq {valueString}");
        }
        public void ShouldBuildStronglyTypedIntFilter()
        {
            var value       = int.MaxValue;
            var valueString = value.ToString();

            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Int).Equals(value);
            builder
            .Build()
            .ShouldBe($"Int eq {valueString}");
        }
        public void ShouldBuildStronglyTypedGuidFilter()
        {
            var value       = Guid.NewGuid();
            var valueString = $"guid'{value}'";

            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Guid).Equals(value);
            builder
            .Build()
            .ShouldBe($"Guid eq {valueString}");
        }
        public void ShouldBuildStronglyTypedDoubleFilter()
        {
            var value       = double.MaxValue;
            var valueString = value.ToString(CultureInfo.InvariantCulture);

            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Double).Equals(value);
            builder
            .Build()
            .ShouldBe($"Double eq {valueString}");
        }
        public void ShouldBuildStronglyTypedDateFilter()
        {
            var value       = DateTimeOffset.Now;
            var valueString = $"datetime'{value.ToUniversalTime():yyyy-MM-ddTHH:mm:ss.fffffff}Z'";

            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Date).Equals(value);
            builder
            .Build()
            .ShouldBe($"Date eq {valueString}");
        }
        public void ShouldBuildStronglyTypedBytesFilter()
        {
            var value       = new byte[] { 0, 1, 2, 4, 8, 16, 32, 64, 128, 255 };
            var valueString = $"X'{string.Join("", value.Select(x => $"{x:x2}"))}'";

            var builder = new TableQueryFilterBuilder <TestEntity>();

            builder.Property(e => e.Bytes).Equals(value);
            builder
            .Build()
            .ShouldBe($"Bytes eq {valueString}");
        }
        public void ShouldBuildFilter(string operation, object value, string expected)
        {
            var builder = new TableQueryFilterBuilder <TestEntity>();

            var conditionBuilder = builder.Property("Fake");
            var method           = conditionBuilder.GetType().GetMethod(operation, new[] { value.GetType() });

            method.Invoke(conditionBuilder, new object[] { value });

            builder
            .Build()
            .ShouldBe($"Fake {expected}");
        }