Revision 9674

View differences:

org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.main/src/main/assembly/package-main.xml
1
<assembly>
2

  
3
    <id>package-main</id>
4
    <formats>
5
        <format>dir</format>
6
        <format>zip</format>
7
    </formats>
8

  
9
    <baseDirectory>${project.artifactId}</baseDirectory>
10
    <includeBaseDirectory>false</includeBaseDirectory>
11

  
12
    <files>
13
        <file>
14
            <source>target/${project.artifactId}-${project.version}.jar</source>
15
            <outputDirectory>.</outputDirectory>
16
        </file>
17
    </files>
18

  
19
    <fileSets>
20
        <fileSet>
21
            <directory>src/main/resources/data</directory>
22
            <outputDirectory>data</outputDirectory>
23
        </fileSet>
24
    </fileSets>
25

  
26
    <dependencySets>
27
        <dependencySet>
28
            <useProjectArtifact>false</useProjectArtifact>
29
            <useTransitiveDependencies>true</useTransitiveDependencies>
30
            <outputDirectory>lib</outputDirectory>
31
        </dependencySet>
32
    </dependencySets>
33

  
34
</assembly>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.main/src/main/java/org/gvsig/vcsgis/main/Main.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2020 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.vcsgis.main;
25

  
26
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
27

  
28
/**
29
 * Main executable class of vcsgis tool.
30
 *
31
 * @author gvSIG Team
32
 */
33
public class Main {
34

  
35
    public static void main(String args[]) {
36
        new DefaultLibrariesInitializer().fullInitialize();
37
    }
38

  
39
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.main/src/main/resources/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2012 gvSIG Association.
5

  
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public License
8
    as published by the Free Software Foundation; either version 2
9
    of the License, or (at your option) any later version.
10

  
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15

  
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
    MA  02110-1301, USA.
20

  
21
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
Put into this folder the resources needed by your classes.
26

  
27
This folder is added to the classpath, so you can load any resources 
28
through the ClassLoader.
29

  
30
By default, in this folder you can find an example of log4j configuration,
31
prepared to log messages through the console, so logging works when you
32
run your classes.
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.main/src/main/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2012 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
28

  
29
<!-- 
30
Log4J configuration file for unit tests execution.
31
 -->
32
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
33

  
34
	<!-- Appender configuration to show logging messages through the console -->
35
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
36
		<layout class="org.apache.log4j.PatternLayout">
37
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]  %m%n" />
38
		</layout>
39
	</appender>
40

  
41
	<!-- 
42
	Activate logging messages of DEBUG level of higher only for the
43
	org.gvsig.tools packages.
44
	You can put full classes names or packages instead, to configure
45
	logging for all the classes and subpackages of the package.
46
	-->
47
	<category name="org.gvsig">
48
		<priority value="WARN" />
49
	</category>
50
	<category name="org.cresques">
51
		<priority value="WARN" />
52
	</category>
53

  
54
	<!-- 
55
	By default, show only logging messages of INFO level or higher, 
56
	through the previously configured CONSOLE appender. 
57
	-->
58
	<root>
59
		<priority value="INFO" />
60
		<appender-ref ref="CONSOLE" />
61
	</root>
62
</log4j:configuration>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.main/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
    <modelVersion>4.0.0</modelVersion>
4
    <artifactId>org.gvsig.vcsgis.main</artifactId>
5
    <packaging>jar</packaging>
6
    <name>${project.artifactId}</name>
7
    <parent>
8
        <groupId>org.gvsig</groupId>
9
        <artifactId>org.gvsig.vcsgis</artifactId>
10
        <version>1.0.0-SNAPSHOT</version>
11
    </parent>
12
  
13
  
14
    <build>
15
        <plugins>
16
            <plugin>
17
                <artifactId>maven-assembly-plugin</artifactId>
18
                <executions>
19
                    <execution>
20
                        <id>package-main</id>
21
                        <phase>package</phase>
22
                        <goals>
23
                            <goal>single</goal>
24
                        </goals>
25
                        <configuration>
26
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
27
                            <appendAssemblyId>false</appendAssemblyId>
28
                            <finalName>${project.artifactId}-${project.version}</finalName>
29
                            <descriptors>
30
                                <descriptor>src/main/assembly/package-main.xml</descriptor>
31
                            </descriptors>
32
                        </configuration>
33
                    </execution>
34
                </executions>
35
            </plugin>
36

  
37
            <plugin>
38
                <groupId>org.apache.maven.plugins</groupId>
39
                <artifactId>maven-jar-plugin</artifactId>
40
                <configuration>
41
                    <archive>
42
                        <manifest>
43
                            <addClasspath>true</addClasspath>
44
                            <mainClass>org.gvsig.vcsgis.main.Main</mainClass>
45
                            <classpathPrefix>lib</classpathPrefix>
46
                        </manifest>
47
                    </archive>
48
                </configuration>
49
            </plugin>
50

  
51
        </plugins>
52

  
53
    </build>
54
  
55
  
56
    <dependencies>
57
        <dependency>
58
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.vcsgis.lib.api</artifactId>
60
            <scope>compile</scope>
61
        </dependency>
62
        <dependency>
63
            <groupId>org.gvsig</groupId>
64
            <artifactId>org.gvsig.vcsgis.swing.api</artifactId>
65
            <scope>compile</scope>
66
        </dependency>
67

  
68
        <!-- runtime dependencies -->
69
        <dependency>
70
            <groupId>org.gvsig</groupId>
71
            <artifactId>org.gvsig.vcsgis.lib.impl</artifactId>
72
            <scope>runtime</scope>
73
        </dependency>
74
        <dependency>
75
            <groupId>org.gvsig</groupId>
76
            <artifactId>org.gvsig.vcsgis.swing.impl</artifactId>
77
            <scope>compile</scope>
78
        </dependency>
79
        <dependency>
80
            <groupId>org.gvsig</groupId>
81
            <artifactId>${org.gvsig.metadata.lib.basic.impl}</artifactId>
82
            <scope>runtime</scope>
83
        </dependency>
84
        <dependency>
85
            <groupId>org.gvsig</groupId>
86
            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
87
            <scope>runtime</scope>
88
        </dependency>
89
        <dependency>
90
            <groupId>org.gvsig</groupId>
91
            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
92
            <scope>runtime</scope>
93
        </dependency>
94
        <dependency>
95
            <groupId>org.gvsig</groupId>
96
            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
97
            <scope>runtime</scope>
98
        </dependency>
99
        <dependency>
100
            <groupId>org.gvsig</groupId>
101
            <artifactId>org.gvsig.fmap.dal.file.shp</artifactId>
102
            <scope>runtime</scope>
103
        </dependency>
104
        <dependency>
105
            <groupId>org.gvsig</groupId>
106
            <artifactId>org.gvsig.fmap.dal.file.dbf</artifactId>
107
            <scope>runtime</scope>
108
        </dependency>
109
        <dependency>
110
            <groupId>org.gvsig</groupId>
111
            <artifactId>org.gvsig.fmap.dal.db.lib</artifactId>
112
            <scope>runtime</scope>
113
        </dependency>
114
        <dependency>
115
            <groupId>org.gvsig</groupId>
116
            <artifactId>org.gvsig.fmap.dal.db.h2</artifactId>
117
            <scope>runtime</scope>
118
        </dependency>
119

  
120
        <dependency>
121
            <groupId>org.gvsig</groupId>
122
            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
123
            <scope>runtime</scope>
124
        </dependency>
125
        <dependency>
126
            <groupId>org.gvsig</groupId>
127
            <artifactId>${org.gvsig.timesupport.lib.impl}</artifactId>
128
            <scope>runtime</scope>
129
        </dependency>
130

  
131
        <dependency>
132
            <groupId>org.gvsig</groupId>
133
            <artifactId>${org.gvsig.compat.impl}</artifactId>
134
            <scope>runtime</scope>
135
        </dependency>
136
        <dependency>
137
            <groupId>org.gvsig</groupId>
138
            <artifactId>${org.gvsig.fmap.geometry.impl}</artifactId>
139
            <scope>runtime</scope>
140
        </dependency>
141

  
142
        <dependency>
143
            <groupId>org.gvsig</groupId>            
144
            <artifactId>${org.gvsig.proj.lib.impl}</artifactId>
145
            <scope>runtime</scope>
146
        </dependency>
147

  
148
        <dependency>
149
            <groupId>org.gvsig</groupId>
150
            <artifactId>org.gvsig.tools.swing.api</artifactId>
151
            <scope>runtime</scope>
152
        </dependency>
153
        <dependency>
154
            <groupId>org.gvsig</groupId>
155
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
156
            <scope>runtime</scope>
157
        </dependency>
158

  
159

  
160
    </dependencies>
161
</project>
0 162

  
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/AbstractTest02Initws.java
1
package org.gvsig.vcsgis.lib.impl;
2

  
3
import java.io.File;
4
import java.util.Collections;
5
import java.util.Comparator;
6
import java.util.HashSet;
7
import java.util.List;
8
import java.util.Map;
9
import java.util.Set;
10
import static junit.framework.TestCase.assertEquals;
11
import org.apache.commons.io.FileUtils;
12
import org.apache.commons.lang3.StringUtils;
13
import org.gvsig.fmap.dal.DALLocator;
14
import org.gvsig.fmap.dal.DataManager;
15
import org.gvsig.fmap.dal.DataStoreParameters;
16
import static org.gvsig.fmap.dal.DatabaseWorkspaceManager.TABLE_CONFIGURATION_NAME;
17
import static org.gvsig.fmap.dal.DatabaseWorkspaceManager.TABLE_REPOSITORY_NAME;
18
import static org.gvsig.fmap.dal.DatabaseWorkspaceManager.TABLE_RESOURCES_NAME;
19
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
20
import org.gvsig.fmap.dal.feature.FeatureStore;
21
import org.gvsig.fmap.dal.feature.FeatureType;
22
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
23
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
24
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
25
import org.gvsig.tools.util.MapBuilder;
26
import org.gvsig.vcsgis.lib.VCSGisLocator;
27
import org.gvsig.vcsgis.lib.VCSGisManager;
28
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
29
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
30
import org.gvsig.vcsgis.lib.workspace.tables.EntitiesTable;
31
import org.gvsig.vcsgis.lib.workspace.tables.LocalRevisionsTable;
32
import org.gvsig.vcsgis.lib.workspace.tables.RemoteChangesTable;
33
import org.gvsig.vcsgis.lib.workspace.tables.TopologyplanTable;
34
import org.gvsig.vcsgis.lib.workspace.tables.UsersTable;
35
import org.gvsig.vcsgis.lib.workspace.tables.VarsTable;
36
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
37

  
38
public abstract class AbstractTest02Initws extends AbstractTestVCSGIS {
39

  
40
    public AbstractTest02Initws(String testName) {
41
        super(testName);
42
    }
43

  
44
    @Override
45
    protected void setUp() throws Exception {
46
        super.setUp();
47
    }
48

  
49
    @Override
50
    protected void tearDown() throws Exception {
51
        super.tearDown();
52
    }
53

  
54
    // TODO add test methods here. The name must begin with 'test'. For example:
55
    // public void testHello() {}
56

  
57
    protected void testCreateWS() throws Exception {
58
        utils().cleanRepositoryDatabase();
59
        
60
        String testid = "initws";
61
        VCSGisManager vcsgismanager = VCSGisLocator.getVCSGisManager();
62

  
63
        JDBCServerExplorerParameters server = utils().getRepositoryServerExplorerParameters("srv-"+testid);
64
        File wsfile = utils().getFile(FileUtils.getFile("test-dbs","ws-"+testid)); 
65

  
66
        int r = vcsgismanager.initRepository(server, null);
67
        assertEquals("initRepository status", 0, r);
68

  
69
        utils().info_repository(server);
70
        assertTrue("repository isRepository", vcsgismanager.isRepository(server));
71
        VCSGisRepository repo = vcsgismanager.openRepository(server);
72
        
73
        r = vcsgismanager.initWorkspace(wsfile, repo, "Test initws", null);
74
        assertEquals("initWorkspace ws status", 0, r);
75
        utils().info_workspace(wsfile);
76
        
77
        VCSGisWorkspace workspace = vcsgismanager.openWorkspace(wsfile);
78
        assertNotNull("Can't open workspace", workspace);
79
        assertTrue("workspace isWorkspace", vcsgismanager.isWorkspace(workspace.getExplorerParameters()));
80
        assertFalse("workspace isRepository", vcsgismanager.isRepository(workspace.getExplorerParameters()));
81
        
82
        
83
        JDBCServerExplorer wsexplorer = utils().openWorkspaceServerExplorer(wsfile);
84
        List<DataStoreParameters> tables = wsexplorer.list();
85
        Collections.sort(tables, new Comparator<DataStoreParameters>() {
86
            @Override
87
            public int compare(DataStoreParameters o1, DataStoreParameters o2) {
88
                return StringUtils.compare(
89
                        ((JDBCStoreParameters) o1).getTable(),
90
                        ((JDBCStoreParameters) o2).getTable()
91
                );
92
            }
93
        });
94
        Map<String, FeatureType> expectedTables = new MapBuilder<>()
95
                .add(WorkspaceChangesTable.TABLE_NAME,WorkspaceChangesTable.featureType())
96
                .add(VarsTable.TABLE_NAME,VarsTable.featureType())
97
                .add(EntitiesTable.TABLE_NAME,EntitiesTable.featureType())
98
                .add(RemoteChangesTable.TABLE_NAME,RemoteChangesTable.featureType())
99
                .add(LocalRevisionsTable.TABLE_NAME,LocalRevisionsTable.featureType())
100
                .add(UsersTable.TABLE_NAME,UsersTable.featureType())
101
                .add(TopologyplanTable.TABLE_NAME,TopologyplanTable.featureType())
102
                .add(TABLE_CONFIGURATION_NAME,null)
103
                .add(TABLE_REPOSITORY_NAME,null)
104
                .add(TABLE_RESOURCES_NAME,null)
105
                .build();
106
        
107
        Set<String>foundTableNames = new HashSet<>();
108
        for (DataStoreParameters table : tables) {
109
            JDBCStoreParameters params = (JDBCStoreParameters) table;
110
            String tableName = params.getTable();
111
            if (!tableName.startsWith("VCSGIS_") && !tableName.startsWith("GVSIGD_")) {
112
                continue;
113
            }
114
            assertTrue(expectedTables.containsKey(tableName));
115
            foundTableNames.add(tableName);
116
        }
117
        for (String tableName : expectedTables.keySet()) {
118
            assertTrue(foundTableNames.contains(tableName));
119
        }
120

  
121
        DataManager dataManager = DALLocator.getDataManager();
122
        for (DataStoreParameters tableParams : tables) {
123
            JDBCStoreParameters params = (JDBCStoreParameters) tableParams;
124
            String tableName = params.getTable();
125
            if (!tableName.startsWith("VCSGIS_") && !tableName.startsWith("GVSIGD_")) {
126
                continue;
127
            }
128
            FeatureStore store = (FeatureStore) dataManager.openStore(params.getProviderName(), params);
129
            FeatureType expectedFeatureType = expectedTables.get(tableName);
130
            if( expectedFeatureType!=null ) {
131
                FeatureType ft = store.getDefaultFeatureTypeQuietly();
132
                for (FeatureAttributeDescriptor expectedAttr : expectedFeatureType) {
133
                    FeatureAttributeDescriptor attr = ft.getAttributeDescriptor(expectedAttr.getName());
134
                    assertNotNull("Attr "+expectedAttr.getName(), attr);
135
                    assertEquals("Attr "+expectedAttr.getName()+" type", expectedAttr.getType(), attr.getType());
136
                    assertEquals("Attr "+expectedAttr.getName()+" size", expectedAttr.getSize(), attr.getSize());
137
                    assertEquals("Attr "+expectedAttr.getName()+" isPrimaryKey", expectedAttr.isPrimaryKey(), attr.isPrimaryKey());
138
                    assertEquals("Attr "+expectedAttr.getName()+" isIndexed", expectedAttr.isIndexed(), attr.isIndexed());
139
                    assertEquals("Attr "+expectedAttr.getName()+" allowIndexDuplicateds", expectedAttr.allowIndexDuplicateds(), attr.allowIndexDuplicateds());
140
                    assertEquals("Attr "+expectedAttr.getName()+" isReadOnly", expectedAttr.isReadOnly(), attr.isReadOnly());
141
                    assertEquals("Attr "+expectedAttr.getName()+" DefaultValue", expectedAttr.getDefaultValue(), attr.getDefaultValue());
142
                }
143
            }
144
            store.dispose();
145
        }
146
        repo.dispose();
147
        workspace.dispose();
148
        wsexplorer.dispose();
149
        vcsgismanager.clean();
150
    }
151
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/AbstractTest17Geom1.java
1
package org.gvsig.vcsgis.lib.impl;
2

  
3
import java.io.File;
4
import java.util.List;
5
import static junit.framework.TestCase.assertEquals;
6
import org.apache.commons.io.FileUtils;
7
import org.gvsig.fmap.dal.feature.Feature;
8
import org.gvsig.fmap.dal.feature.FeatureStore;
9
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
10
import org.gvsig.fmap.geom.Geometry;
11
import org.gvsig.tools.dispose.DisposeUtils;
12
import org.gvsig.vcsgis.lib.SequentialCodeGenerator;
13
import org.gvsig.vcsgis.lib.VCSGisLocator;
14
import org.gvsig.vcsgis.lib.VCSGisManager;
15
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
16
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_NEW;
17
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
18
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
19
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity;
20
import org.gvsig.vcsgis.lib.workspace.tables.EntitiesTable;
21
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
22
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_UNMODIFIED;
23

  
24
@SuppressWarnings("UseSpecificCatch")
25
public abstract class AbstractTest17Geom1 extends AbstractTestVCSGIS {
26

  
27
    public AbstractTest17Geom1(String testName) {
28
        super(testName);
29
    }
30

  
31
    @Override
32
    protected void setUp() throws Exception {
33
        super.setUp();
34
    }
35

  
36
    @Override
37
    protected void tearDown() throws Exception {
38
        super.tearDown();
39
    }
40

  
41
    // TODO add test methods here. The name must begin with 'test'. For example:
42
    // public void testHello() {}
43
    protected void testGeom1() throws Exception {
44
        try {
45
            utils().cleanRepositoryDatabase();
46

  
47
            VCSGisManager manager = VCSGisLocator.getVCSGisManager();
48
            manager.setCodeGenerator(new SequentialCodeGenerator());
49

  
50
            JDBCServerExplorer server = utils().openRepositoryServerExplorer("srv-geom1");
51
            File ws1file = utils().getFile(FileUtils.getFile("test-dbs", "ws-geom1_1"));
52
            File ws2file = utils().getFile(FileUtils.getFile("test-dbs", "ws-geom1_2"));
53

  
54
            int r = manager.initRepository(server.getParameters(), null);
55
            assertEquals("vcsgisadmin.init status", ERR_NO_ERROR, r);
56

  
57
            VCSGisRepository repo = manager.openRepository(server.getParameters());
58
            utils().info_repository(repo);
59

  
60
            r = manager.initWorkspace(ws1file, repo, "Test geom1 A", null);
61
            assertEquals("vcsgis.init_workspace1 status", ERR_NO_ERROR, r);
62

  
63
            VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
64
            assertNotNull("vcsgis.open_workspace1 status", ws1);
65
            utils().info_workspace(ws1);
66

  
67
            FeatureStore store1 = utils().openGeom1Store();
68
            ws1.add("Geom1Store", store1, "PRO_NAME");
69
            assertEquals("ws1.add status", ERR_NO_ERROR, r);
70

  
71
            VCSGisWorkspaceEntity entity = ws1.getWorkspaceEntityByName("Geom1Store");
72
            assertEquals("State must be new", STATE_LOCAL_NEW, entity.getState());
73

  
74
            ws1.commit();
75
            assertEquals("ws1.commit status", ERR_NO_ERROR, r);
76

  
77
            entity = ws1.getWorkspaceEntityByName("Geom1Store");
78
            assertEquals("State must be new", STATE_LOCAL_UNMODIFIED, entity.getState());
79

  
80
            r = manager.initWorkspace(ws2file, repo, "Test geom1 B", null);
81
            assertEquals("vcsgis.init_workspace2 status", ERR_NO_ERROR, r);
82
            VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
83
            assertNotNull("vcsgis.open_workspace2 status", ws2);
84
            utils().info_workspace(ws2);
85

  
86
            r = ws2.checkout("Geom1Store");
87
            assertEquals("ws2-geom1 status", ERR_NO_ERROR, r);
88

  
89
            VCSGisWorkspaceEntity ent = ws2.getWorkspaceEntityByName("Geom1Store");
90
            assertEquals("State must be new", STATE_LOCAL_UNMODIFIED, ent.getState());
91

  
92
            EntitiesTable.EntityRow entityRow = new EntitiesTable().getByEntityName(ws2, "Geom1Store");
93
            assertEquals("ws2-geom1 entityState", STATE_LOCAL_UNMODIFIED, entityRow.getState());
94

  
95
            FeatureStore changesStore = ws2.getFeatureStore(WorkspaceChangesTable.TABLE_NAME);
96
            assertEquals("ws2-geom1 changesTable", 0L, changesStore.size64());
97

  
98
            FeatureStore store2 = ws2.getFeatureStore("Geom1Store");
99
            assertEquals("ws2-geom1 sizes", store1.size64(), store2.size64());
100
            List<Feature> features1 = store1.getFeatures();
101
            List<Feature> features2 = store2.getFeatures();
102
            for (int i = 0; i < features1.size(); i++) {
103
                Geometry g1 = features1.get(i).getDefaultGeometry();
104
                Geometry g2 = features2.get(i).getDefaultGeometry();
105
                assertEquals("ws2-geom1 check geometries "+i, g1.convertToHexWKB(), g2.convertToHexWKB());
106
            }
107

  
108
            DisposeUtils.disposeQuietly(store2);
109
            DisposeUtils.disposeQuietly(store1);
110
        } catch (Throwable th) {
111
            LOGGER.warn("", th);
112
            throw th;
113
        }
114
    }
115

  
116
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/AbstractTest18Revert.java
1
package org.gvsig.vcsgis.lib.impl;
2

  
3
import java.io.File;
4
import static junit.framework.TestCase.assertEquals;
5
import org.apache.commons.io.FileUtils;
6
import org.gvsig.fmap.dal.feature.EditableFeature;
7
import org.gvsig.fmap.dal.feature.Feature;
8
import org.gvsig.fmap.dal.feature.FeatureStore;
9
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
10
import org.gvsig.vcsgis.lib.SequentialCodeGenerator;
11
import org.gvsig.vcsgis.lib.VCSGisLocator;
12
import org.gvsig.vcsgis.lib.VCSGisManager;
13
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
14
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_DELETE;
15
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_INSERT;
16
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_UPDATE;
17
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_MODIFIED;
18
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_UNMODIFIED;
19
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
20
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
21
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity;
22

  
23
public abstract class AbstractTest18Revert extends AbstractTestVCSGIS {
24

  
25
    public AbstractTest18Revert(String testName) {
26
        super(testName);
27
    }
28

  
29
    @Override
30
    protected void setUp() throws Exception {
31
        super.setUp();
32
    }
33

  
34
    @Override
35
    protected void tearDown() throws Exception {
36
        super.tearDown();
37
    }
38

  
39
    private void check(FeatureStore store2, String relatedFeatureCode, int id, String text) throws Exception {
40
        Feature f = store2.findFirst("VCSGISCODE = '"+relatedFeatureCode+"'");
41
        assertEquals(id, f.getInt("id"));
42
        assertEquals(text, f.getString("text"));
43
    }
44

  
45
    // TODO add test methods here. The name must begin with 'test'. For example:
46
    // public void testHello() {}
47

  
48
    protected void testRevert() throws Exception {
49
        utils().cleanRepositoryDatabase();
50
        
51
        JDBCServerExplorer server = utils().openRepositoryServerExplorer("srv-updatelocalmodified");
52
        File ws1file = utils().getFile(FileUtils.getFile("test-dbs","ws1-updatelocalmodified")); 
53
        
54
        
55
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
56
        manager.setCodeGenerator(new SequentialCodeGenerator());
57

  
58
        int r;
59
        Feature f;
60
        EditableFeature ef;
61
        VCSGisWorkspaceEntity entity;
62
        
63
        // ------------------------------------------------------------
64
        // Inicializamos el repositorio y lo abrimos
65
        r = manager.initRepository(server.getParameters(), null);
66
        assertEquals("init_server status", ERR_NO_ERROR, r);
67
        
68
        VCSGisRepository repo = manager.openRepository(server.getParameters());
69
        utils().info_repository(repo);
70

  
71
        // ------------------------------------------------------------
72
        // Creamos workspace1 y lo abrimos.
73
        r = manager.initWorkspace(ws1file, repo, "ws1: Test update local modified", null);
74
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
75
        
76
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
77
        utils().info_workspace(ws1);
78

  
79
        // ------------------------------------------------------------
80
        // Adicionamos al workspace1 la tabla "test" y la commitamos.
81
        utils().test_add(ws1);
82
        utils().test_commit(ws1);
83
        
84
        // ------------------------------------------------------------
85
        // Modificamos la tabla "test" en el workspace1 y la commitamos.
86
        utils().test_modify( ws1,
87
                "update", 2, "BB2",
88
                "delete", 3, "CCC",
89
                "insert", 4, "DDD"
90
        );
91
        entity = ws1.getWorkspaceEntityByName("test");
92
        assertEquals("State must be local modified", STATE_LOCAL_MODIFIED, entity.getState());
93
        
94
        // Comprobamos que en el workspace1 hay lo que toca
95
        utils().test_checkall(ws1, 
96
                1, "AAA",
97
                2, "BB2",
98
                4, "DDD"
99
        );
100

  
101
        // Comprobamos los cambios locales
102
        utils().test_checklocalchanges(ws1, 
103
                OP_UPDATE, 2, "BB2",
104
                OP_DELETE, 3, "CCC",
105
                OP_INSERT, 4, "DDD"
106
        );
107
        
108
        ws1.revert("test", null);
109
        entity = ws1.getWorkspaceEntityByName("test");
110
        assertEquals("State must be unmodified", STATE_LOCAL_UNMODIFIED, entity.getState());
111
        
112
        // Comprobamos que en el workspace1 se han recuperado los valores previos
113
         utils().test_checkall(ws1, 
114
            1, "AAA",
115
            2, "BBB",
116
            3, "CCC"
117
        );
118

  
119
        // Comprobamos que se han eliminado los cambios locales
120
        utils().test_checklocalchanges(ws1); //No local changes
121
        
122
    }
123

  
124
    protected void testRevert2() throws Exception {
125
        utils().cleanRepositoryDatabase();
126
        
127
        JDBCServerExplorer server = utils().openRepositoryServerExplorer("srv-updatelocalmodified");
128
        File ws1file = utils().getFile(FileUtils.getFile("test-dbs","ws1-updatelocalmodified")); 
129
        
130
        
131
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
132
        manager.setCodeGenerator(new SequentialCodeGenerator());
133

  
134
        int r;
135
        Feature f;
136
        EditableFeature ef;
137
        
138
        // ------------------------------------------------------------
139
        // Inicializamos el repositorio y lo abrimos
140
        r = manager.initRepository(server.getParameters(), null);
141
        assertEquals("init_server status", ERR_NO_ERROR, r);
142
        
143
        VCSGisRepository repo = manager.openRepository(server.getParameters());
144
        utils().info_repository(repo);
145

  
146
        // ------------------------------------------------------------
147
        // Creamos workspace1 y lo abrimos.
148
        r = manager.initWorkspace(ws1file, repo, "ws1: Test update local modified", null);
149
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
150
        
151
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
152
        utils().info_workspace(ws1);
153

  
154
        // ------------------------------------------------------------
155
        // Adicionamos al workspace1 la tabla "test" y la commitamos.
156
        utils().test_add(ws1);
157
        utils().test_commit(ws1);
158
        
159
        // ------------------------------------------------------------
160
        // Modificamos la tabla "test" en el workspace1 y la commitamos.
161
        utils().test_modify( ws1,
162
                "update", 2, "BB2",
163
                "delete", 3, "CCC",
164
                "insert", 4, "DDD"
165
        );
166

  
167
        // Comprobamos que en el workspace1 hay lo que toca
168
        utils().test_checkall(ws1, 
169
                1, "AAA",
170
                2, "BB2",
171
                4, "DDD"
172
        );
173

  
174
        // Comprobamos los cambios locales
175
        utils().test_checklocalchanges(ws1, 
176
                OP_UPDATE, 2, "BB2",
177
                OP_DELETE, 3, "CCC",
178
                OP_INSERT, 4, "DDD"
179
        );
180

  
181
        utils().test_modify( ws1,
182
                "update", 2, "BB3",
183
                "update", 4, "DD2"
184
        );
185
        
186
        // Comprobamos que en el workspace1 hay lo que toca
187
        utils().test_checkall(ws1, 
188
                1, "AAA",
189
                2, "BB3",
190
                4, "DD2"
191
        );
192

  
193
        // Comprobamos los cambios locales
194
        utils().test_checklocalchanges(ws1, 
195
                OP_UPDATE, 2, "BB3",
196
                OP_DELETE, 3, "CCC",
197
                OP_INSERT, 4, "DD2"
198
        );
199

  
200
        utils().test_modify( ws1,
201
                "update", 2, "BB4",
202
                "update", 4, "DD3"
203
        );
204

  
205
        // Comprobamos que en el workspace1 hay lo que toca
206
        utils().test_checkall(ws1, 
207
                1, "AAA",
208
                2, "BB4",
209
                4, "DD3"
210
        );
211

  
212
        // Comprobamos los cambios locales
213
        utils().test_checklocalchanges(ws1, 
214
                OP_UPDATE, 2, "BB4",
215
                OP_DELETE, 3, "CCC",
216
                OP_INSERT, 4, "DD3"
217
        );
218
        
219
        ws1.revert("test", null);
220
        
221
        // Comprobamos que en el workspace1 se han recuperado los valores previos
222
         utils().test_checkall(ws1, 
223
            1, "AAA",
224
            2, "BBB",
225
            3, "CCC"
226
        );
227

  
228
        // Comprobamos que se han eliminado los cambios locales
229
        utils().test_checklocalchanges(ws1); //No local changes
230
        
231
    }
232
    
233
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test10UpdateEmpty.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest10UpdateEmpty;
4
import org.gvsig.vcsgis.lib.impl.AbstractTest10UpdateLocalModified;
5
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
6

  
7
public class Test10UpdateEmpty extends AbstractTest10UpdateEmpty {
8

  
9
    private TestUtilsH2Spatial utils;
10

  
11
    public Test10UpdateEmpty(String testName) {
12
        super(testName);
13
    }
14
    
15
    @Override
16
    protected void setUp() throws Exception {
17
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
18
        this.utils = new TestUtilsH2Spatial();
19
    }
20
    
21
    @Override
22
    protected AbstractTestUtils utils() {
23
        return this.utils;
24
    }
25

  
26
    @Override
27
    public void testUpdateEmpty() throws Exception {
28
        super.testUpdateEmpty(); 
29
    }
30

  
31
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test13Merge.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest13Merge;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test13Merge extends AbstractTest13Merge {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test13Merge(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testMerge() throws Exception {
27
        super.testMerge(); 
28
    }
29

  
30
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test14UpdateWithConflict.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest14UpdateWithConflict;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test14UpdateWithConflict extends AbstractTest14UpdateWithConflict {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test14UpdateWithConflict(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testOneCommitAndMergeOverDeleted() throws Exception {
27
        super.testOneCommitAndMergeOverDeleted();
28
    }
29

  
30
    @Override
31
    public void testTwoInsertsAndMerge() throws Exception {
32
        super.testTwoInsertsAndMerge(); 
33
    }
34

  
35
    @Override
36
    public void testOneCommitAndUpdateOverDeleted() throws Exception {
37
        super.testOneCommitAndUpdateOverDeleted(); 
38
    }
39

  
40
    @Override
41
    public void testTwoInsertsAndUpdate() throws Exception {
42
        super.testTwoInsertsAndUpdate();
43
    }
44

  
45
    @Override
46
    public void testTwoUpdatesAndMerge() throws Exception {
47
        super.testTwoUpdatesAndMerge(); 
48
    }
49

  
50
    @Override
51
    public void testTwoUpdatesAndUpdate() throws Exception {
52
        super.testTwoUpdatesAndUpdate();
53
    }
54

  
55
    @Override
56
    public void testTwoUpdatesMergeAndUpdate() throws Exception {
57
        super.testTwoUpdatesMergeAndUpdate();
58
    }
59

  
60
    
61
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test20ExportToEffectiveDate.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest20ExportToEffectiveDate;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test20ExportToEffectiveDate extends AbstractTest20ExportToEffectiveDate {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test20ExportToEffectiveDate(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testExportToEffectiveDateAlteredOrder() throws Exception {
27
        super.testExportToEffectiveDateAlteredOrder(); 
28
    }
29

  
30
    @Override
31
    public void testExportToEffectiveDateConsecutive() throws Exception {
32
        super.testExportToEffectiveDateConsecutive(); 
33
    }
34
    
35
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test06AddCommit.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest06AddCommit;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test06AddCommit extends AbstractTest06AddCommit {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test06AddCommit(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testAddCommit() throws Exception {
27
        super.testAddCommit(); 
28
    }
29

  
30
    @Override
31
    public void testAddCommitSelectedTable() throws Exception {
32
        super.testAddCommitSelectedTable(); 
33
    }
34

  
35
    
36
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/TestUtilsH2Spatial.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import java.net.URL;
4
import java.util.Properties;
5
import org.gvsig.fmap.dal.DataStore;
6
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
7
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
8

  
9
public class TestUtilsH2Spatial  extends AbstractTestUtils {
10

  
11
    protected static final String REPO_PROVIDER_NAME = DataStore.H2SPATIAL_PROVIDER_NAME;
12

  
13
    @Override
14
    public String getRepositoryProviderName() {
15
        return REPO_PROVIDER_NAME;
16
    }
17
    @Override
18
    protected Properties getProperties() {
19
        if (this.properties == null) {
20
            try {
21
                URL url = this.getClass().getResource("h2spatial.properties");
22
                Properties props = new Properties();
23
                props.load(url.openStream());
24
                String[] keys = new String[]{
25
                    "H2SpatialBactchSize"
26
                };
27
                for (String key : keys) {
28
                    if (System.getenv().containsKey(key)) {
29
                        props.setProperty(key, System.getenv(key));
30
                    }
31
                }
32
                this.properties = props;
33
            } catch (Exception ex) {
34
                throw new RuntimeException(ex);
35
            }
36
        }
37
        return this.properties;
38
    }
39
    
40
    @Override
41
    public JDBCServerExplorerParameters getRepositoryServerExplorerParameters(String dbname) throws Exception {
42
        return this.getH2SpatialServerExplorerParameters(dbname);
43
    }
44
    
45
    @Override
46
    public void cleanRepositoryDatabase() {
47
        
48
    }
49

  
50
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test15AddExisting.java
1

  
2
package org.gvsig.vcsgis.lib.impl.h2spatial;
3

  
4
import org.gvsig.vcsgis.lib.impl.AbstractTest15AddExisting;
5
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
6

  
7
public class Test15AddExisting extends AbstractTest15AddExisting {
8

  
9
    private TestUtilsH2Spatial utils;
10

  
11
    public Test15AddExisting(String testName) {
12
        super(testName);
13
    }
14
    
15
    @Override
16
    protected void setUp() throws Exception {
17
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
18
        this.utils = new TestUtilsH2Spatial();
19
    }
20
    
21
    @Override
22
    protected AbstractTestUtils utils() {
23
        return this.utils;
24
    }
25

  
26
    @Override
27
    public void testAdd() throws Exception {
28
        super.testAdd();
29
    }
30

  
31
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test19Authorization.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest19Authorization;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test19Authorization extends AbstractTest19Authorization {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test19Authorization(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testAuthorizationAllAllowed() throws Exception {
27
        super.testAuthorizationAllAllowed(); 
28
    }
29

  
30
    @Override
31
    public void testAuthorizationCheckoutNotAllowed() throws Exception {
32
        super.testAuthorizationCheckoutNotAllowed(); 
33
    }
34

  
35
    @Override
36
    public void testAuthorizationCommitByEntityNotAllowed() throws Exception {
37
        super.testAuthorizationCommitByEntityNotAllowed();
38
    }
39

  
40
    @Override
41
    public void testAuthorizationUserCommitNotAllowed() throws Exception {
42
        super.testAuthorizationUserCommitNotAllowed(); 
43
    }
44
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test07Checkout.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest07Checkout;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test07Checkout extends AbstractTest07Checkout {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test07Checkout(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testCheckout() throws Exception {
27
        super.testCheckout(); 
28
    }
29

  
30
    @Override
31
    public void testCheckout2() throws Exception {
32
        super.testCheckout2();
33
    }
34

  
35
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test02Initws.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest02Initws;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test02Initws extends AbstractTest02Initws {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test02Initws(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19

  
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testCreateWS() throws Exception {
27
        super.testCreateWS(); 
28
    }
29

  
30
    
31
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test18Revert.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest18Revert;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test18Revert extends AbstractTest18Revert {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test18Revert(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testRevert() throws Exception {
27
        super.testRevert(); 
28
    }
29

  
30
    @Override
31
    public void testRevert2() throws Exception {
32
        super.testRevert2();
33
    }
34
    
35
    
36
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test17Geom1.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest17Geom1;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test17Geom1 extends AbstractTest17Geom1 {
7

  
8
    private final TestUtilsH2Spatial utils;
9

  
10
    public Test17Geom1(String testName) {
11
        super(testName);
12
        this.utils = new TestUtilsH2Spatial();
13
    }
14
    
15
    @Override
16
    protected AbstractTestUtils utils() {
17
        return this.utils;
18
    }
19

  
20
    @Override
21
    public void testGeom1() throws Exception {
22
        super.testGeom1();
23
    }
24
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test03GetWorkspaces.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest03GetWorkspaces;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test03GetWorkspaces extends AbstractTest03GetWorkspaces {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test03GetWorkspaces(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19

  
20
    
21
    @Override
22
    protected AbstractTestUtils utils() {
23
        return this.utils;
24
    }
25

  
26
    @Override
27
    public void testGetWorkspaces() throws Exception {
28
        super.testGetWorkspaces();
29
    }
30

  
31
    @Override
32
    public void testGetWorkspaces2() throws Exception {
33
        super.testGetWorkspaces2();
34
    }
35

  
36
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test11GetLocalChanges.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest11GetLocalChanges;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test11GetLocalChanges extends AbstractTest11GetLocalChanges {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test11GetLocalChanges(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19
    
20
    @Override
21
    protected AbstractTestUtils utils() {
22
        return this.utils;
23
    }
24

  
25
    @Override
26
    public void testUpdate() throws Exception {
27
        super.testUpdate(); 
28
    }
29

  
30
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test04AddEntity.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
2

  
3
import org.gvsig.vcsgis.lib.impl.AbstractTest04AddEntity;
4
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
5

  
6
public class Test04AddEntity extends AbstractTest04AddEntity {
7

  
8
    private TestUtilsH2Spatial utils;
9

  
10
    public Test04AddEntity(String testName) {
11
        super(testName);
12
    }
13
    
14
    @Override
15
    protected void setUp() throws Exception {
16
        super.setUp(); //To change body of generated methods, choose Tools | Templates.
17
        this.utils = new TestUtilsH2Spatial();
18
    }
19

  
20
    
21
    @Override
22
    protected AbstractTestUtils utils() {
23
        return this.utils;
24
    }
25

  
26
    @Override
27
    public void testAdd_entity1() throws Exception {
28
        super.testAdd_entity1(); 
29
    }
30

  
31

  
32
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.126/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/h2spatial/Test01InitRepo.java
1
package org.gvsig.vcsgis.lib.impl.h2spatial;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff