mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 11:35:10 +00:00
removed extra unused excheptions
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
This commit is contained in:
parent
12a9064e26
commit
1007204f9d
2 changed files with 6 additions and 10 deletions
|
|
@ -7,7 +7,6 @@ package org.hyperledger.fabric.samples.assettransfer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import org.hyperledger.fabric.contract.Context;
|
import org.hyperledger.fabric.contract.Context;
|
||||||
import org.hyperledger.fabric.contract.ContractInterface;
|
import org.hyperledger.fabric.contract.ContractInterface;
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ import org.junit.jupiter.api.Nested;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mockito.InOrder;
|
import org.mockito.InOrder;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public final class AssetTransferTest {
|
public final class AssetTransferTest {
|
||||||
|
|
||||||
private final class MockKeyValue implements KeyValue {
|
private final class MockKeyValue implements KeyValue {
|
||||||
|
|
@ -112,7 +109,7 @@ public final class AssetTransferTest {
|
||||||
class InvokeReadAssetTransaction {
|
class InvokeReadAssetTransaction {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAssetExists() throws JsonProcessingException, IOException {
|
public void whenAssetExists() {
|
||||||
AssetTransfer contract = new AssetTransfer();
|
AssetTransfer contract = new AssetTransfer();
|
||||||
Context ctx = mock(Context.class);
|
Context ctx = mock(Context.class);
|
||||||
ChaincodeStub stub = mock(ChaincodeStub.class);
|
ChaincodeStub stub = mock(ChaincodeStub.class);
|
||||||
|
|
@ -144,7 +141,7 @@ public final class AssetTransferTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void invokeInitLedgerTransaction() throws JsonProcessingException {
|
void invokeInitLedgerTransaction() {
|
||||||
AssetTransfer contract = new AssetTransfer();
|
AssetTransfer contract = new AssetTransfer();
|
||||||
Context ctx = mock(Context.class);
|
Context ctx = mock(Context.class);
|
||||||
ChaincodeStub stub = mock(ChaincodeStub.class);
|
ChaincodeStub stub = mock(ChaincodeStub.class);
|
||||||
|
|
@ -183,7 +180,7 @@ public final class AssetTransferTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAssetDoesNotExist() throws JsonProcessingException {
|
public void whenAssetDoesNotExist() {
|
||||||
AssetTransfer contract = new AssetTransfer();
|
AssetTransfer contract = new AssetTransfer();
|
||||||
Context ctx = mock(Context.class);
|
Context ctx = mock(Context.class);
|
||||||
ChaincodeStub stub = mock(ChaincodeStub.class);
|
ChaincodeStub stub = mock(ChaincodeStub.class);
|
||||||
|
|
@ -197,7 +194,7 @@ public final class AssetTransferTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void invokeGetAllAssetsTransaction() throws JsonProcessingException, IOException {
|
void invokeGetAllAssetsTransaction() {
|
||||||
AssetTransfer contract = new AssetTransfer();
|
AssetTransfer contract = new AssetTransfer();
|
||||||
Context ctx = mock(Context.class);
|
Context ctx = mock(Context.class);
|
||||||
ChaincodeStub stub = mock(ChaincodeStub.class);
|
ChaincodeStub stub = mock(ChaincodeStub.class);
|
||||||
|
|
@ -219,7 +216,7 @@ public final class AssetTransferTest {
|
||||||
class TransferAssetTransaction {
|
class TransferAssetTransaction {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAssetExists() throws JsonProcessingException {
|
public void whenAssetExists() {
|
||||||
AssetTransfer contract = new AssetTransfer();
|
AssetTransfer contract = new AssetTransfer();
|
||||||
Context ctx = mock(Context.class);
|
Context ctx = mock(Context.class);
|
||||||
ChaincodeStub stub = mock(ChaincodeStub.class);
|
ChaincodeStub stub = mock(ChaincodeStub.class);
|
||||||
|
|
@ -254,7 +251,7 @@ public final class AssetTransferTest {
|
||||||
class UpdateAssetTransaction {
|
class UpdateAssetTransaction {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAssetExists() throws JsonProcessingException {
|
public void whenAssetExists() {
|
||||||
AssetTransfer contract = new AssetTransfer();
|
AssetTransfer contract = new AssetTransfer();
|
||||||
Context ctx = mock(Context.class);
|
Context ctx = mock(Context.class);
|
||||||
ChaincodeStub stub = mock(ChaincodeStub.class);
|
ChaincodeStub stub = mock(ChaincodeStub.class);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue