/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *    (C) 2002-2006, Geotools Project Managment Committee (PMC)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation; either
 *    version 2.1 of the License, or (at your option) any later version.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    Created on June 21, 2002, 12:24 PM
 */
package org.geotools.filter;


import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.PrecisionModel;


/**
 * Tests the literal expressions.
 *
 * @author James Macgill
 * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/test/java/org/geotools/filter/LiteralTest.java $
 */
public class LiteralTest extends TestCase {
    public LiteralTest(java.lang.String testName) {
        super(testName);
    }

    public static void main(java.lang.String[] args) {
        junit.textui.TestRunner.run(suite());
    }

    public static Test suite() {
        TestSuite suite = new TestSuite(LiteralTest.class);

        return suite;
    }

    public void testValidConstruction() throws Exception {
        LiteralExpression a = new LiteralExpressionImpl(new Double(10));
        LiteralExpression b = new LiteralExpressionImpl("Label");
        LiteralExpression c = new LiteralExpressionImpl(new Integer(10));
        GeometryFactory gf = new GeometryFactory(new PrecisionModel());
        LiteralExpression d = new LiteralExpressionImpl(gf.createGeometryCollection(null));
    }

//    public void testInvalidConstruction1() throws Exception {
//        try {
//            LiteralExpression a = new LiteralExpressionImpl(new Double(10));
//            LiteralExpression b = new LiteralExpressionImpl(a);
//        } catch (IllegalFilterException ife) {
//            return;
//        }
//
//        fail("ExpressionLiterals can not contain " + "other excepresions");
//    }
}
