summaryrefslogtreecommitdiffstats
path: root/northbound/daexim-offsite-backup/provider/src/test
diff options
context:
space:
mode:
authorMichael DÜrre <michael.duerre@highstreet-technologies.com>2021-01-18 05:41:16 +0100
committerMichael DÜrre <michael.duerre@highstreet-technologies.com>2021-02-02 07:28:40 +0100
commit56c27daf1656fd6436f8c818c771cf803079e1ea (patch)
treea2734caf88f1633d14db763281d2a03e4ec8aef5 /northbound/daexim-offsite-backup/provider/src/test
parent0e4e58bf061df695341ac250beb97a978cefdaf7 (diff)
migrate sli to alu-SR1
migrate ODL interfaces and fix code for changes in alu-SR1 Issue-ID: CCSDK-3089 Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com> Change-Id: Id48dcfc517585f2ce6b30047113cd1d173c3c9dc Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'northbound/daexim-offsite-backup/provider/src/test')
-rw-r--r--northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java b/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java
index 0f0cee288..03fe37513 100644
--- a/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java
+++ b/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java
@@ -26,7 +26,7 @@ import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.FluentFuture;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -38,10 +38,9 @@ import java.util.concurrent.ExecutionException;
import org.eclipse.jdt.annotation.Nullable;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.daeximoffsitebackup.rev180926.DaeximOffsiteBackupService;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.daeximoffsitebackup.rev180926.RetrieveDataInput;
import org.opendaylight.yangtools.yang.binding.Augmentation;
@@ -49,8 +48,8 @@ import org.opendaylight.yangtools.yang.binding.Augmentation;
public class DaeximOffsiteBackupProviderTest {
public DataBroker dataBroker;
public ReadWriteTransaction writeTransaction;
- public CheckedFuture<Void, TransactionCommitFailedException> checkedFuture;
- public RpcProviderRegistry rpcRegistry;
+ public FluentFuture checkedFuture;
+ public RpcProviderService rpcRegistry;
public DaeximOffsiteBackupProvider provider;
public Properties resProps;
@@ -61,16 +60,16 @@ public class DaeximOffsiteBackupProviderTest {
resProps.put("error-message", "Success");
dataBroker = mock(DataBroker.class);
writeTransaction = mock(ReadWriteTransaction.class);
- checkedFuture = mock(CheckedFuture.class);
- rpcRegistry = mock(RpcProviderRegistry.class);
- when(rpcRegistry.addRoutedRpcImplementation(any(), any(DaeximOffsiteBackupService.class))).thenReturn(null);
+ checkedFuture = mock(FluentFuture.class);
+ rpcRegistry = mock(RpcProviderService.class);
+ when(rpcRegistry.registerRpcImplementation(any(), any(DaeximOffsiteBackupService.class))).thenReturn(null);
try {
when(checkedFuture.get()).thenReturn(null);
}
catch(InterruptedException | ExecutionException e) {
e.printStackTrace();
}
- when(writeTransaction.submit()).thenReturn(checkedFuture);
+ when(writeTransaction.commit()).thenReturn(checkedFuture);
when(dataBroker.newReadWriteTransaction()).thenReturn(writeTransaction);
provider = new DaeximOffsiteBackupProvider(dataBroker, rpcRegistry);