summaryrefslogtreecommitdiffstats
path: root/v3po/translate-utils/src/test
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-04-12 10:13:37 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-04-12 10:13:37 +0200
commitcd6bcf78d807993c72984f09155e342a78d6ba80 (patch)
tree8c06df3f164115dbebc7084fe4a0482304069dbb /v3po/translate-utils/src/test
parent1c8b3b7dfb3cdf124e6a88df72612ec181de6f14 (diff)
HONEYCOMB-9: Migrate Interface listener
Change-Id: Iffde1ee21b749a8c8efa96c243f7f8bb0811b4c7 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/translate-utils/src/test')
-rw-r--r--v3po/translate-utils/src/test/java/io/fd/honeycomb/v3po/translate/impl/write/util/DelegatingWriterRegistryTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/v3po/translate-utils/src/test/java/io/fd/honeycomb/v3po/translate/impl/write/util/DelegatingWriterRegistryTest.java b/v3po/translate-utils/src/test/java/io/fd/honeycomb/v3po/translate/impl/write/util/DelegatingWriterRegistryTest.java
index e201890b5..f51e49db5 100644
--- a/v3po/translate-utils/src/test/java/io/fd/honeycomb/v3po/translate/impl/write/util/DelegatingWriterRegistryTest.java
+++ b/v3po/translate-utils/src/test/java/io/fd/honeycomb/v3po/translate/impl/write/util/DelegatingWriterRegistryTest.java
@@ -24,9 +24,9 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
-import io.fd.honeycomb.v3po.translate.TranslationException;
import io.fd.honeycomb.v3po.translate.util.write.DelegatingWriterRegistry;
import io.fd.honeycomb.v3po.translate.write.WriteContext;
+import io.fd.honeycomb.v3po.translate.write.WriteFailedException;
import io.fd.honeycomb.v3po.translate.write.Writer;
import io.fd.honeycomb.v3po.translate.write.WriterRegistry;
import java.util.ArrayList;
@@ -117,8 +117,8 @@ public class DelegatingWriterRegistryTest {
final DataObject dataAfter2 = mockDataObject("VppState after", VppState.class);
// Fail on update
- Mockito.doThrow(new TranslationException("vpp failed")).when(vppStateWriter)
- .update(vppStateId, dataBefore2, dataAfter2, ctx);
+ Mockito.doThrow(new WriteFailedException(InstanceIdentifier.create(Vpp.class), "vpp failed"))
+ .when(vppStateWriter).update(vppStateId, dataBefore2, dataAfter2, ctx);
// Run the test
try {
@@ -154,11 +154,11 @@ public class DelegatingWriterRegistryTest {
final DataObject dataAfter3 = mockDataObject("Interfaces after", Interfaces.class);
// Fail on the third update
- doThrow(new TranslationException("vpp failed")).when(interfacesWriter)
+ doThrow(new WriteFailedException(InstanceIdentifier.create(Vpp.class), "vpp failed")).when(interfacesWriter)
.update(interfaceId, dataBefore3, dataAfter3, ctx);
// Fail on the second revert
- doThrow(new TranslationException("vpp failed again")).when(writer)
+ doThrow(new WriteFailedException(InstanceIdentifier.create(Vpp.class), "vpp failed")).when(writer)
.update(vppId, dataAfter1, dataBefore1, ctx);
// Run the test