← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12043: Removed test class

 

------------------------------------------------------------
revno: 12043
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-11 17:41:26 +0200
message:
  Removed test class
removed:
  dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/
  dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/ConfigurationManagerTest.java
  dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/DummyConfiguration.java
modified:
  dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/location/LocationManagerTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== removed directory 'dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration'
=== removed file 'dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/ConfigurationManagerTest.java'
--- dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/ConfigurationManagerTest.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/ConfigurationManagerTest.java	1970-01-01 00:00:00 +0000
@@ -1,95 +0,0 @@
-package org.hisp.dhis.external.configuration;
-
-/*
- * Copyright (c) 2004-2013, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.hisp.dhis.DhisSpringTest;
-import org.hisp.dhis.external.location.LocationManager;
-import org.hisp.dhis.external.location.LocationManagerException;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class ConfigurationManagerTest
-    extends DhisSpringTest
-{
-    @Autowired
-    private ConfigurationManager<DummyConfiguration> configurationManager;
-    
-    @Autowired
-    private LocationManager locationManager;
-    
-    private DummyConfiguration configurationA;
-    private DummyConfiguration configurationB;
-    
-    @Override
-    public void setUpTest()
-    {
-        configurationA = new DummyConfiguration( "homeA", "directoryA" );
-        configurationB = new DummyConfiguration( "homeB", "directoryB" );
-    }
-    
-    @Test
-    public void testSetGet()
-        throws Exception
-    {
-        try
-        {
-            OutputStream outA = locationManager.getOutputStream( "safeToDeleteA.xml", "test" );
-            OutputStream outB = locationManager.getOutputStream( "safeToDeleteB.xml", "test" );
-            
-            configurationManager.setConfiguration( configurationA, outA );
-            configurationManager.setConfiguration( configurationB, outB );
-            
-            InputStream inA = locationManager.getInputStream( "safeToDeleteA.xml", "test" );
-            InputStream inB = locationManager.getInputStream( "safeToDeleteB.xml", "test" );
-            
-            DummyConfiguration receivedA = configurationManager.getConfiguration( inA, DummyConfiguration.class );
-            DummyConfiguration receivedB = configurationManager.getConfiguration( inB, DummyConfiguration.class );
-            
-            assertNotNull( receivedA );
-            assertNotNull( receivedB );
-            
-            assertEquals( configurationA, receivedA );
-            assertEquals( configurationB, receivedB );
-        }
-        catch ( LocationManagerException ex )
-        {
-            // External directory not set
-        }
-    }
-}

=== removed file 'dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/DummyConfiguration.java'
--- dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/DummyConfiguration.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/configuration/DummyConfiguration.java	1970-01-01 00:00:00 +0000
@@ -1,150 +0,0 @@
-package org.hisp.dhis.external.configuration;
-
-/*
- * Copyright (c) 2004-2013, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.io.Serializable;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class DummyConfiguration
-    implements Serializable
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = 1270752110781492612L;
-
-    private String home;
-    
-    private String directory;
-
-    // -------------------------------------------------------------------------
-    // Configuration
-    // -------------------------------------------------------------------------
-
-    public DummyConfiguration()
-    {   
-    }
-    
-    public DummyConfiguration( String home, String directory )
-    {
-        this.home = home;
-        this.directory = directory;
-    }
-
-    // -------------------------------------------------------------------------
-    // Equals and hashCode
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        
-        int result = 1;
-        
-        result = prime * result + ( ( directory == null ) ? 0 : directory.hashCode() );        
-        result = prime * result + ( ( home == null ) ? 0 : home.hashCode() );
-        
-        return result;
-    }
-
-    @Override
-    public boolean equals( Object object )
-    {
-        if ( this == object )
-        {
-            return true;
-        }
-        
-        if ( object == null )
-        {
-            return false;
-        }
-        
-        if ( getClass() != object.getClass() )
-        {
-            return false;
-        }
-        
-        final DummyConfiguration other = (DummyConfiguration) object;
-        
-        if ( directory == null )
-        {
-            if ( other.directory != null )
-            {
-                return false;
-            }
-        }
-        else if ( !directory.equals( other.directory ) )
-        {
-            return false;
-        }
-        
-        if ( home == null )
-        {
-            if ( other.home != null )
-            {
-                return false;
-            }
-        }
-        else if ( !home.equals( other.home ) )
-        {
-            return false;
-        }
-        
-        return true;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public String getHome()
-    {
-        return home;
-    }
-
-    public void setHome( String home )
-    {
-        this.home = home;
-    }
-
-    public String getDirectory()
-    {
-        return directory;
-    }
-
-    public void setDirectory( String directory )
-    {
-        this.directory = directory;
-    }
-}

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/location/LocationManagerTest.java'
--- dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/location/LocationManagerTest.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/external/location/LocationManagerTest.java	2013-09-11 15:41:26 +0000
@@ -40,6 +40,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.DhisSpringTest;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -47,6 +48,7 @@
  * @author Lars Helge Overland
  * @version $Id$
  */
+@Ignore // Takes forever to run, enable to test modifications
 public class LocationManagerTest
     extends DhisSpringTest
 {