
Test UserImplementation (OK) Test SessionImplementation (OK) Test WalletImplmeentation - must correct queryWalletByOwner, setSoldOnWallet in chaincode
41 lines
1.2 KiB
Java
41 lines
1.2 KiB
Java
package restImplementation;
|
|
|
|
import org.apache.log4j.BasicConfigurator;
|
|
import org.apache.log4j.Logger;
|
|
import org.junit.Ignore;
|
|
import org.junit.Test;
|
|
|
|
@Ignore
|
|
public class SessionImplementationTest {
|
|
private static Logger logger = Logger.getLogger(SessionImplementationTest.class);
|
|
|
|
@Test
|
|
public void testAstartSession() { //OK
|
|
BasicConfigurator.configure();
|
|
String userHash = "$2a$10$tdkMwJ7BQSOXO2uofu/fEOlncUfuX7SsjB.2N9KVsXJUQiarAQzpG";
|
|
String userEmail = "TotoEmail@gmail.com";
|
|
SessionImplementation sessionImplementation = new SessionImplementation();
|
|
|
|
try{
|
|
int responseSessionId = sessionImplementation.startSession(userHash,userEmail);
|
|
logger.info("SESSION ID : "+responseSessionId);
|
|
} catch (Exception e){
|
|
logger.warn("Error: "+e);
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
public void testBendSession(){ //OK
|
|
BasicConfigurator.configure();
|
|
SessionImplementation sessionImplementation = new SessionImplementation();
|
|
try{
|
|
sessionImplementation.endSession(1);
|
|
} catch (Exception e){
|
|
logger.warn("Error: "+e);
|
|
}
|
|
}
|
|
|
|
|
|
}
|