Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorslewis2016-12-03 20:16:24 -0500
committerslewis2016-12-03 20:16:24 -0500
commit42a37fe3dd48b6ad4a45c5d961dc5108b669bdf6 (patch)
tree72fbcc5a647468b0ed813805222e915878159387 /tests
parent1393dca8d7786785aa8679258c38683a4c2c7bcc (diff)
downloadorg.eclipse.ecf-42a37fe3dd48b6ad4a45c5d961dc5108b669bdf6.tar.gz
org.eclipse.ecf-42a37fe3dd48b6ad4a45c5d961dc5108b669bdf6.tar.xz
org.eclipse.ecf-42a37fe3dd48b6ad4a45c5d961dc5108b669bdf6.zip
Added scp test case
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/.settings/org.eclipse.jdt.core.prefs52
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF3
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/SCPOutgoingTest2.java77
3 files changed, 129 insertions, 3 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/.settings/org.eclipse.jdt.core.prefs b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/.settings/org.eclipse.jdt.core.prefs
index b47db63f1..7f0f24e9f 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,3 @@
-#Tue Apr 29 21:49:54 PDT 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,6 +6,15 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -19,17 +27,23 @@ org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
@@ -37,7 +51,10 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -45,31 +62,62 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.3
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF
index 4993af751..191f94685 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF
@@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ecf.tests,
org.junit,
org.eclipse.ecf.tests.filetransfer,
- org.eclipse.equinox.concurrent
+ org.eclipse.equinox.concurrent,
+ org.eclipse.ecf.provider.filetransfer.scp
Eclipse-LazyStart: true
Export-Package: org.eclipse.ecf.internal.tests.provider.filetransfer.scp;x-internal:=true,
org.eclipse.ecf.tests.provider.filetransfer.scp
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/SCPOutgoingTest2.java b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/SCPOutgoingTest2.java
new file mode 100644
index 000000000..d5751cb5c
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/SCPOutgoingTest2.java
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.tests.provider.filetransfer.scp;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Hashtable;
+import org.eclipse.ecf.core.security.ConnectContextFactory;
+import org.eclipse.ecf.filetransfer.IFileTransferListener;
+import org.eclipse.ecf.filetransfer.events.IFileTransferEvent;
+import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferSendDoneEvent;
+import org.eclipse.ecf.filetransfer.identity.FileIDFactory;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
+import org.eclipse.ecf.internal.provider.filetransfer.scp.ScpSendFileTransferFactory;
+
+/**
+ *
+ */
+public class SCPOutgoingTest2 extends AbstractSCPTest {
+
+ private String localSendFile = System.getProperty("localSendFile", "test.txt"); //$NON-NLS-1$ //$NON-NLS-2$
+ private String targetSendFile = System.getProperty("targetSendFile", "test.txt"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ ISendFileTransfer sender = null;
+ IFileTransferListener senderTransferListener = null;
+ IFileID targetID;
+
+ protected void syncNotify() {
+ super.syncNotify();
+ }
+
+ private IFileTransferListener getFileTransferListener(final String prefix) {
+ return new IFileTransferListener() {
+ public void handleTransferEvent(IFileTransferEvent event) {
+ System.out.println(prefix + ".handleTransferEvent(" + event + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (event instanceof IOutgoingFileTransferSendDoneEvent) {
+ System.out.println(prefix + " DONE"); //$NON-NLS-1$
+ syncNotify();
+ }
+ }
+ };
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ sender = new ScpSendFileTransferFactory().newInstance();
+ senderTransferListener = getFileTransferListener("localhost"); //$NON-NLS-1$
+ String targetURL = "scp://" + username + "@" + host + (targetSendFile.startsWith("/") ? "" : "/") + targetSendFile; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ targetID = FileIDFactory.getDefault().createFileID(sender.getOutgoingNamespace(), new URL(targetURL));
+ sender.setConnectContextForAuthentication(ConnectContextFactory.createPasswordConnectContext(password));
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ sender = null;
+ senderTransferListener = null;
+ }
+
+ public void testSend() throws Exception {
+ System.out.println("sending to targetID=" + targetID); //$NON-NLS-1$
+ Hashtable ht = new Hashtable();
+ ht.put("test", "testa");
+ sender.sendOutgoingRequest(targetID, new File(localSendFile), senderTransferListener, ht);
+
+ syncWaitForNotify(20000);
+ }
+}

Back to the top