JUnitTest updated

v3.0.0
ROBERTO CIRILLO 3 years ago
parent 4e58624c4a
commit 59b841ba94

@ -6,24 +6,21 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

@ -1,12 +1,13 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

@ -65,6 +65,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>

@ -58,7 +58,7 @@ public class DownloadsTest {
}
@Test
// @Test
public void getId(){
String id= client.getId(encryptedId);
System.out.println("id decrypted: "+id);

@ -6,7 +6,7 @@ import java.io.File;
import java.util.List;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.contentmanagement.blobstorage.resource.MyFile;
import org.gcube.contentmanagement.blobstorage.resource.RequestObject;
import org.gcube.contentmanagement.blobstorage.resource.StorageObject;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException;
@ -53,7 +53,7 @@ public class GetMetaFileTest {
@Test
public void getMetaFileByPath() throws RemoteBackendException {
MyFile f= client.getMetaFile().RFile(remotePath);
RequestObject f= client.getMetaFile().RFile(remotePath);
// System.out.println("mime is: "+f.getMimeType());
client.put(true, "image/png").LFile("src/test/resources/dog.jpg").RFile(remotePath);
f= client.getMetaFile().RFile(remotePath);
@ -70,7 +70,7 @@ public class GetMetaFileTest {
@Test
public void getMetaFileById() throws RemoteBackendException {
MyFile f= client.getMetaFile().RFile(id);
RequestObject f= client.getMetaFile().RFile(id);
assertNotNull(f);
assertEquals(id, f.getId());
print(f);
@ -89,7 +89,7 @@ public class GetMetaFileTest {
assertTrue(list.isEmpty());
}
private void print(MyFile f) {
private void print(RequestObject f) {
System.out.println("\t name "+f.getName());
System.out.println("\t size "+f.getSize());
System.out.println("\t owner "+f.getOwner());

@ -52,7 +52,7 @@ public class LockTest {
assertNotNull(id);
}
@Test
// @Test
public void lockTest(){
//download & lock
String idLock=client.lock().LFile(absoluteLocalPathDownload).RFile(remotePath);

@ -6,7 +6,7 @@ import java.io.File;
import java.util.List;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.contentmanagement.blobstorage.resource.MyFile;
import org.gcube.contentmanagement.blobstorage.resource.RequestObject;
import org.gcube.contentmanagement.blobstorage.resource.StorageObject;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException;
@ -53,12 +53,12 @@ public class PropertiesTest {
public void getPropertyByPath() throws RemoteBackendException {
String valueFound= client.getMetaInfo(field).RFile(remotePath);
System.out.println("value found for property: "+field+" is "+valueFound);
MyFile f= client.getMetaFile().RFile(remotePath);
RequestObject f= client.getMetaFile().RFile(remotePath);
assertNotNull(f);
print(f);
String result= client.setMetaInfo(field, value).RFile(remotePath);
System.out.println("new property set ");
MyFile f1= client.getMetaFile().RFile(remotePath);
RequestObject f1= client.getMetaFile().RFile(remotePath);
print(f1);
assertNotNull(f1);
assertEquals(f1.getMimeType(), value);
@ -70,12 +70,12 @@ public class PropertiesTest {
public void getPropertyById() throws RemoteBackendException {
String valueFound= client.getMetaInfo(field).RFile(id);
System.out.println("value found for property: "+field+" is "+valueFound);
MyFile f= client.getMetaFile().RFile(id);
RequestObject f= client.getMetaFile().RFile(id);
assertNotNull(f);
print(f);
String result= client.setMetaInfo(field, value).RFile(id);
System.out.println("new property set ");
MyFile f1= client.getMetaFile().RFile(id);
RequestObject f1= client.getMetaFile().RFile(id);
print(f1);
assertNotNull(f1);
assertEquals(f1.getMimeType(), value);
@ -85,7 +85,7 @@ public class PropertiesTest {
// @Test
public void setProperty() throws RemoteBackendException {
String result= client.setMetaInfo(field, value).RFile(id);
MyFile f= client.getMetaFile().RFile(remotePath);
RequestObject f= client.getMetaFile().RFile(remotePath);
assertNotNull(f);
print(f);
@ -99,7 +99,7 @@ public class PropertiesTest {
removeLocalFile();
}
private void print(MyFile f) {
private void print(RequestObject f) {
System.out.println("\t name "+f.getName());
System.out.println("\t size "+f.getSize());
System.out.println("\t owner "+f.getOwner());

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 346 KiB

Loading…
Cancel
Save