30 lines
982 B
Java
30 lines
982 B
Java
package blockchain.query.User;
|
|
|
|
|
|
import blockchain.query.TransactionWrapper;
|
|
import org.apache.log4j.BasicConfigurator;
|
|
import org.apache.log4j.Logger;
|
|
import org.hyperledger.fabric.sdk.*;
|
|
import org.junit.Ignore;
|
|
import org.junit.Test;
|
|
|
|
|
|
@Ignore
|
|
public class DeleteUserTest {
|
|
private static Logger logger = Logger.getLogger(DeleteUserTest.class);
|
|
|
|
@Test
|
|
public void TestDeleteUser() {
|
|
BasicConfigurator.configure();
|
|
try{
|
|
TransactionWrapper transactionWrapper = new TransactionWrapper();
|
|
String functionName = "deleteUser";
|
|
String[] args = new String[]{"$2a$10$04YjBhcKPG.DD8abC/AnhOwTIbYH1x0Gr78XXVhAd6551c3Cb21i2"};
|
|
BlockEvent.TransactionEvent responseEvent = transactionWrapper.sendTransaction(functionName,args);
|
|
logger.info("Event transaction id : "+responseEvent.getTransactionID()); //print transaction id
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|