summaryrefslogtreecommitdiffstats
path: root/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-08-16 09:21:24 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-08-16 07:56:39 +0000
commit130c716105017c7b20b4779973b915968b3dc322 (patch)
tree50b28ac5691928dcff03fcf8cb57bec651a270c1 /infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java
parentc643983450d5fd56db40ad2718877ec2289e6e6f (diff)
HONEYCOMB-386 - Make update optional
If customizer does not support update directly, updates for its handled nodes are broken up to delete + create pairs. Change-Id: I2929109e8c9a1db0bef108367cf7d839135ce173 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java')
-rw-r--r--infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java
index 14c9c6044..9b95f7662 100644
--- a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java
+++ b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/write/AbstractGenericWriterTest.java
@@ -51,7 +51,7 @@ public class AbstractGenericWriterTest {
@Test
public void testDelete() throws Exception {
before = mock(DataObject.class);
- t.update(id, before, null, ctx);
+ t.processModification(id, before, null, ctx);
verify(t).deleteCurrentAttributes(id, before, ctx);
}
@@ -59,7 +59,7 @@ public class AbstractGenericWriterTest {
@Test
public void testUpdate() throws Exception {
before = mock(DataObject.class);
- t.update(id, before, after, ctx);
+ t.processModification(id, before, after, ctx);
verify(t).updateCurrentAttributes(id, before, after, ctx);
}
@@ -67,7 +67,7 @@ public class AbstractGenericWriterTest {
@Test
public void testNoUpdate() throws Exception {
before = mock(DataObject.class);
- t.update(id, before, before, ctx);
+ t.processModification(id, before, before, ctx);
verify(t, times(0)).updateCurrentAttributes(id, before, after, ctx);
}
@@ -75,7 +75,7 @@ public class AbstractGenericWriterTest {
@Test
public void testCreate() throws Exception {
before = mock(DataObject.class);
- t.update(id, null, after, ctx);
+ t.processModification(id, null, after, ctx);
verify(t).writeCurrentAttributes(id, after, ctx);
}
@@ -83,7 +83,7 @@ public class AbstractGenericWriterTest {
private static class TestingWriter extends AbstractGenericWriter<DataObject> {
TestingWriter() {
- super(InstanceIdentifier.create(DataObject.class));
+ super(InstanceIdentifier.create(DataObject.class), false);
}
@Override