﻿using jgshort.SqlDom;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using jgshort.SqlDom.Expressions;
using jgshort.SqlDom.Expressions.Functions.ScalarFunctions.StringFunctions;

namespace jgshort.SqlDom.Tests
{   
    /// <summary>
    ///This is a test class for Upper and is intended to contain all Upper Unit Tests
    ///</summary>
    [TestClass()]
    public class UpperTest
    {
        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get { return testContextInstance; }
            set { testContextInstance = value; }
        }
        
        /// <summary>
        ///A test for Upper Constructor
        ///</summary>
        [TestMethod()]
        public void UpperConstructorTest()
        {
            Expression expression = Sql.String("foo");
            Assert.IsNotNull(expression);
            Upper target = new Upper(expression);
            Assert.IsNotNull(target);
            Assert.IsNotNull(target.Expression);
            Assert.IsTrue(target.Expression.GetType() == typeof(ConstantTypes.String));
        }
    }
}
