Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libGeometries / src-test / org / gvsig / geometries / operation / println / PrintlnOperationTest.java @ 20086

History | View | Annotate | Download (2.58 KB)

1
package org.gvsig.geometries.operation.println;
2

    
3
import junit.framework.TestCase;
4

    
5
import org.gvsig.geometries.operation.GeometryOperation;
6
import org.gvsig.geometries.operation.GeometryOperationException;
7

    
8
import com.iver.cit.gvsig.fmap.core.FMultiPoint2D;
9
import com.iver.cit.gvsig.fmap.core.FPoint2D;
10
import com.iver.cit.gvsig.fmap.core.ShapeFactory;
11

    
12
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
13
 *
14
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
15
 *
16
 * This program is free software; you can redistribute it and/or
17
 * modify it under the terms of the GNU General Public License
18
 * as published by the Free Software Foundation; either version 2
19
 * of the License, or (at your option) any later version.
20
 *
21
 * This program is distributed in the hope that it will be useful,
22
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 * GNU General Public License for more details.
25
 *
26
 * You should have received a copy of the GNU General Public License
27
 * along with this program; if not, write to the Free Software
28
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
29
 *
30
 * For more information, contact:
31
 *
32
 *  Generalitat Valenciana
33
 *   Conselleria d'Infraestructures i Transport
34
 *   Av. Blasco Ib??ez, 50
35
 *   46010 VALENCIA
36
 *   SPAIN
37
 *
38
 *      +34 963862235
39
 *   gvsig@gva.es
40
 *      www.gvsig.gva.es
41
 *
42
 *    or
43
 *
44
 *   IVER T.I. S.A
45
 *   Salamanca 50
46
 *   46005 Valencia
47
 *   Spain
48
 *
49
 *   +34 963163400
50
 *   dac@iver.es
51
 */
52
/* CVS MESSAGES:
53
 *
54
 * $Id: PrintlnOperationTest.java,v 1.2 2008/03/25 08:47:41 cvs Exp $
55
 * $Log: PrintlnOperationTest.java,v $
56
 * Revision 1.2  2008/03/25 08:47:41  cvs
57
 * Visitors removed
58
 *
59
 * Revision 1.1  2008/03/12 08:46:21  cvs
60
 * *** empty log message ***
61
 *
62
 *
63
 */
64
/**
65
 * @author Jorge Piera Llodr? (jorge.piera@iver.es)
66
 */
67
public class PrintlnOperationTest extends TestCase{
68

    
69
        /* (non-Javadoc)
70
         * @see junit.framework.TestCase#setUp()
71
         */
72
        protected void setUp() throws Exception {
73
                PrintlnOperation.registerOperations();
74
        }
75
        
76
        public void test1() throws GeometryOperationException{
77
                FPoint2D point = (FPoint2D)ShapeFactory.createPoint2D(1,1);
78
                point.doOperation(GeometryOperation.PRINTLN_OPERATION);                
79
        }
80
        
81
        public void test2() throws GeometryOperationException{
82
                double[] x = new double[3];
83
                double[] y = new double[3];
84
                x[0] = 1;
85
                y[0] = 1;
86
                x[1] = 2;
87
                y[1] = 2;
88
                x[2] = 3;
89
                y[2] = 3;
90
                FMultiPoint2D multiPoint = (FMultiPoint2D)ShapeFactory.createMultipoint2D(x,y);
91
                multiPoint.doOperation(GeometryOperation.PRINTLN_OPERATION);        
92
        }
93
        
94
}