diff options
author | Michael DÜrre <michael.duerre@highstreet-technologies.com> | 2021-01-18 05:41:16 +0100 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2021-01-27 15:56:35 -0500 |
commit | ce4e5f9a00d2677495240ad367b9bfc4b74752d0 (patch) | |
tree | 71292f2ce0a2f8549f1583c712412f43757454f5 /northbound/daexim-offsite-backup/provider/src/test | |
parent | 5de81966f5574ae83e85aa7d5aa8865ea5deef24 (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: Iad824627c581c902b639a2f0246e3133d4e38c48
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.java | 21 |
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); |