Skip to content

Commit

Permalink
Refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-ap committed Apr 27, 2022
1 parent eca5e63 commit 81a7986
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
*
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************/
package blockchains.iaas.uni.stuttgart.de.adaptation.adapters.ethereum;
package blockchains.iaas.uni.stuttgart.de.adaptation;

import blockchains.iaas.uni.stuttgart.de.adaptation.AdapterManager;
import blockchains.iaas.uni.stuttgart.de.api.IAdapterExtension;
import blockchains.iaas.uni.stuttgart.de.api.interfaces.BlockchainAdapter;
import blockchains.iaas.uni.stuttgart.de.api.model.LinearChainTransaction;
import blockchains.iaas.uni.stuttgart.de.connectionprofiles.ConnectionProfilesManager;
import blockchains.iaas.uni.stuttgart.de.management.BlockchainPluginManager;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.*;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.pf4j.PluginState;
import org.pf4j.PluginWrapper;
import org.slf4j.Logger;
Expand All @@ -40,10 +41,10 @@
import java.util.Objects;
import java.util.concurrent.ExecutionException;

public class TestEthereumAdapter {
public class TestLoadAdapter {
// Add -Dpf4j.pluginsDir=<plugin_storage_path> -DethereumPluginJarPath=<path_to_ethereum_plugin_jar>

private static final Logger log = LoggerFactory.getLogger(TestEthereumAdapter.class);
private static final Logger log = LoggerFactory.getLogger(TestLoadAdapter.class);
private static final String NETWORK_NAME = "eth-0";
private static final double REQUIRED_CONFIDENCE = 0.6;
private final BlockchainPluginManager pluginManager = BlockchainPluginManager.getInstance();
Expand Down Expand Up @@ -103,7 +104,7 @@ public void testSendEthereumTransaction() throws IOException, URISyntaxException
final String DEFAULT_CONNECTION_PROFILES_CONFIGURATION_FILE_NAME = "gatewayConfiguration.json";

final File file = new File(Objects.requireNonNull(
TestEthereumAdapter.class.getClassLoader().getResource(DEFAULT_CONNECTION_PROFILES_CONFIGURATION_FILE_NAME)).toURI());
TestLoadAdapter.class.getClassLoader().getResource(DEFAULT_CONNECTION_PROFILES_CONFIGURATION_FILE_NAME)).toURI());

ConnectionProfilesManager manager = ConnectionProfilesManager.getInstance();
manager.resetConnectionProfiles();
Expand Down

This file was deleted.

0 comments on commit 81a7986

Please sign in to comment.