[mule-transport-sftp-dev] [97] branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity: Moved the initEndpointDirectory(..) to the doSetUp method

View: New views
1 Messages — Rating Filter:   Alert me  

[mule-transport-sftp-dev] [97] branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity: Moved the initEndpointDirectory(..) to the doSetUp method

by elhoo :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
[97] branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity: Moved the initEndpointDirectory(..) to the doSetUp method

Diff

Modified: branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantCreateTempDirectoryTestCase.java (96 => 97)

--- branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantCreateTempDirectoryTestCase.java	2009-10-31 20:55:41 UTC (rev 96)
+++ branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantCreateTempDirectoryTestCase.java	2009-11-01 14:30:42 UTC (rev 97)
@@ -16,6 +16,15 @@
 		return "dataintegrity/sftp-dataintegrity-common-with-tempdir-config.xml";
 	}
 
+     @Override
+    protected void doSetUp() throws Exception {
+        super.doSetUp();
+
+        // Delete the in & outbound directories
+		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
+		initEndpointDirectory(OUTBOUND_ENDPOINT_NAME);
+    }
+
 	/**
 	 * No write access on the outbound directory and thus the TEMP directory cant be created.
 	 * The source file should still exist
@@ -26,10 +35,6 @@
 	{
 		MuleClient muleClient = new MuleClient();
 
-		// Delete the in & outbound directories
-		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
-		initEndpointDirectory(OUTBOUND_ENDPOINT_NAME);
-
 		// change the chmod to "dr-x------" on the outbound-directory
 		// --> the temp directory should not be able to be created
 		remoteChmod(muleClient, OUTBOUND_ENDPOINT_NAME, 00500);

Modified: branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantWriteToFinalDestAfterTempDirectoryTestCase.java (96 => 97)

--- branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantWriteToFinalDestAfterTempDirectoryTestCase.java	2009-10-31 20:55:41 UTC (rev 96)
+++ branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantWriteToFinalDestAfterTempDirectoryTestCase.java	2009-11-01 14:30:42 UTC (rev 97)
@@ -20,6 +20,15 @@
 		return "dataintegrity/sftp-dataintegrity-common-with-tempdir-config.xml";
 	}
 
+     @Override
+    protected void doSetUp() throws Exception {
+        super.doSetUp();
+
+         // Delete the in & outbound directories
+         initEndpointDirectory(INBOUND_ENDPOINT_NAME);
+         initEndpointDirectory(OUTBOUND_ENDPOINT_NAME);
+    }
+
 	/**
 	 * No write access on the outbound directory but write access to the TEMP directory.
 	 * The source file should still exist and no file should exist in the TEMP directory.
@@ -28,10 +37,6 @@
 	{
 		MuleClient muleClient = new MuleClient();
 
-		// Delete the in & outbound directories
-		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
-		initEndpointDirectory(OUTBOUND_ENDPOINT_NAME);
-
 		// Must create the temp directory before we change the access rights
 		createRemoteDirectory(muleClient, OUTBOUND_ENDPOINT_NAME, "uploading");
 

Modified: branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpNoOutboundDirectoryTestCase.java (96 => 97)

--- branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpNoOutboundDirectoryTestCase.java	2009-10-31 20:55:41 UTC (rev 96)
+++ branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpNoOutboundDirectoryTestCase.java	2009-11-01 14:30:42 UTC (rev 97)
@@ -16,6 +16,14 @@
         return "dataintegrity/sftp-no-outbound-directory-config.xml";
     }
 
+    @Override
+    protected void doSetUp() throws Exception {
+        super.doSetUp();
+
+        // Delete the in & outbound directories
+		initEndpointDirectory(ENDPOINT_NAME);
+    }
+
     /**
      * The outbound directory doesn't exist.
      * The source file should still exist
@@ -23,9 +31,6 @@
     public void testNoOutboundDirectory() throws Exception {
         MuleClient muleClient = new MuleClient();
 
-		// Delete the in & outbound directories
-		initEndpointDirectory(ENDPOINT_NAME);
-
         // Send an file to the SFTP server, which the inbound-outboundEndpoint then can pick up
         muleClient.dispatch(getAddressByEndpoint(muleClient, ENDPOINT_NAME), TEST_MESSAGE, fileNameProperties);
 

Modified: branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpNoWriteAccessToOutboundDirectoryTestCase.java (96 => 97)

--- branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpNoWriteAccessToOutboundDirectoryTestCase.java	2009-10-31 20:55:41 UTC (rev 96)
+++ branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpNoWriteAccessToOutboundDirectoryTestCase.java	2009-11-01 14:30:42 UTC (rev 97)
@@ -16,15 +16,20 @@
 		return "dataintegrity/sftp-dataintegrity-common-config.xml";
 	}
 
+        @Override
+    protected void doSetUp() throws Exception {
+        super.doSetUp();
+
+        // Delete the in & outbound directories
+		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
+		initEndpointDirectory(OUTBOUND_ENDPOINT_NAME);
+    }
+
 	/** No write access on the outbound directory. The source file should still exist */
 	public void testNoWriteAccessToOutboundDirectory() throws Exception
 	{
 		MuleClient muleClient = new MuleClient();
 
-		// Delete the in & outbound directories
-		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
-		initEndpointDirectory(OUTBOUND_ENDPOINT_NAME);
-
 		// change the chmod to "dr-x------" on the outbound-directory
 		remoteChmod(muleClient, OUTBOUND_ENDPOINT_NAME, 00500);
 

Modified: branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpWrongPassPhraseOnOutboundDirectoryTestCase.java (96 => 97)

--- branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpWrongPassPhraseOnOutboundDirectoryTestCase.java	2009-10-31 20:55:41 UTC (rev 96)
+++ branches/mule-2.2.x/src/test/java/org/mule/transport/sftp/dataintegrity/SftpWrongPassPhraseOnOutboundDirectoryTestCase.java	2009-11-01 14:30:42 UTC (rev 97)
@@ -17,6 +17,14 @@
 		return "dataintegrity/sftp-wrong-passphrase-config.xml";
 	}
 
+    @Override
+    protected void doSetUp() throws Exception {
+        super.doSetUp();
+
+        // Delete the in & outbound directories
+		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
+    }
+
 	/**
 	 * The outbound directory doesn't exist.
 	 * The source file should still exist
@@ -26,9 +34,6 @@
 	{
 		MuleClient muleClient = new MuleClient();
 
-		// Delete the in & outbound directories
-		initEndpointDirectory(INBOUND_ENDPOINT_NAME);
-
 		// Send an file to the SFTP server, which the inbound-outboundEndpoint then can pick up
 		muleClient.dispatch(getAddressByEndpoint(muleClient, INBOUND_ENDPOINT_NAME), TEST_MESSAGE, fileNameProperties);
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MuleForge Dev" group.
To post to this group, send email to muleforgedev@...
To unsubscribe from this group, send email to muleforgedev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/muleforgedev?hl=en
-~----------~----~----~----~------~----~------~--~---
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://admin.muleforge.org/manage_email