public void ShouldCreateTanExpression()
        {
            var factory = new DbExpressionFactory();
            DbMathematicalFunctionExpression mathematicalFunctionExpression = factory.Tan(factory.Column("SomeColumn"));

            ValidateMathematicalFunctionExpression(mathematicalFunctionExpression, DbMathematicalFunctionExpressionType.Tan);
        }
        public void ShouldCreateRoundExpression()
        {
            var factory = new DbExpressionFactory();
            DbMathematicalFunctionExpression mathematicalFunctionExpression = factory.Round(factory.Column("SomeColumn"), factory.Constant(2));

            ValidateMathematicalFunctionExpression(mathematicalFunctionExpression, DbMathematicalFunctionExpressionType.Round);
        }
        public void ShouldCreateRandWithSeedExpression()
        {
            var factory = new DbExpressionFactory();
            DbMathematicalFunctionExpression mathematicalFunctionExpression = factory.Rand(factory.Constant(10));

            ValidateMathematicalFunctionExpression(mathematicalFunctionExpression, DbMathematicalFunctionExpressionType.RandSeed);
        }
        public void ShouldCreateRandExpression()
        {
            var factory = new DbExpressionFactory();
            DbMathematicalFunctionExpression mathematicalFunctionExpression = factory.Rand();

            ValidateMathematicalFunctionExpression(mathematicalFunctionExpression, DbMathematicalFunctionExpressionType.Rand);
        }
 private void ValidateMathematicalFunctionExpression(DbMathematicalFunctionExpression mathematicalFunctionExpression, DbMathematicalFunctionExpressionType mathematicalFunctionExpressionType)
 {
     Assert.IsTrue(mathematicalFunctionExpression.ExpressionType == DbExpressionType.Function);
     Assert.IsTrue(mathematicalFunctionExpression.MathematicalFunctionExpressionType == mathematicalFunctionExpressionType);
     Assert.IsNotNull(mathematicalFunctionExpression.Arguments);
 }
 private void ValidateMathematicalFunctionExpression(DbMathematicalFunctionExpression mathematicalFunctionExpression, DbMathematicalFunctionExpressionType mathematicalFunctionExpressionType)
 {
     Assert.IsTrue(mathematicalFunctionExpression.ExpressionType == DbExpressionType.Function);
     Assert.IsTrue(mathematicalFunctionExpression.MathematicalFunctionExpressionType == mathematicalFunctionExpressionType);
     Assert.IsNotNull(mathematicalFunctionExpression.Arguments);
 }