Fixed test
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@177194 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
74dca02fb3
commit
f046b1a6b7
|
@ -2,8 +2,12 @@ package org.gcube.authorization;
|
|||
|
||||
import static org.gcube.common.authorization.client.Constants.authorizationService;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.common.authorization.client.Binder;
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.ClientInfo;
|
||||
|
@ -65,4 +69,27 @@ public class ContextAuthorizationTest extends ContextTest {
|
|||
logger.trace("Token for Context {} for {} is {}", currentContext, userInfo.getId(), tokenNode);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void seriliazeUser() throws Exception {
|
||||
OutputStream output = new OutputStream()
|
||||
{
|
||||
private StringBuilder string = new StringBuilder();
|
||||
@Override
|
||||
public void write(int b) throws IOException {
|
||||
this.string.append((char) b );
|
||||
}
|
||||
|
||||
//Netbeans IDE automatically overrides this toString()
|
||||
public String toString(){
|
||||
return this.string.toString();
|
||||
}
|
||||
};
|
||||
|
||||
UserInfo userInfo = new UserInfo("luca.frosini", new ArrayList<>());
|
||||
Binder.getContext().createMarshaller().marshal(userInfo, output);
|
||||
|
||||
|
||||
logger.debug("{}", output.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.common.encryption.StringEncrypter;
|
||||
import org.gcube.common.encryption.encrypter.StringEncrypter;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint.Property;
|
||||
|
|
Loading…
Reference in New Issue