Search in sources :

Example 6 with SampleStore

use of org.hyperledger.fabric.sdkintegration.SampleStore in project fabric-sdk-java by hyperledger.

the class HFCAIdentityTest method setup.

@Before
public void setup() throws CryptoException, InvalidArgumentException, org.hyperledger.fabric.sdk.exception.InvalidArgumentException, MalformedURLException, EnrollmentException {
    File sampleStoreFile = new File(System.getProperty("java.io.tmpdir") + "/HFCSampletest.properties");
    if (sampleStoreFile.exists()) {
        // For testing start fresh
        sampleStoreFile.delete();
    }
    sampleStore = new SampleStore(sampleStoreFile);
    sampleStoreFile.deleteOnExit();
    // SampleUser can be any implementation that implements org.hyperledger.fabric.sdk.User Interface
    admin = sampleStore.getMember(TEST_ADMIN_NAME, TEST_ADMIN_ORG);
}
Also used : SampleStore(org.hyperledger.fabric.sdkintegration.SampleStore) File(java.io.File) Before(org.junit.Before)

Aggregations

File (java.io.File)6 SampleStore (org.hyperledger.fabric.sdkintegration.SampleStore)6 Before (org.junit.Before)4 SampleUser (org.hyperledger.fabric.sdkintegration.SampleUser)2 Test (org.junit.Test)1