diff options
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolTest.java')
-rw-r--r-- | plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolTest.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolTest.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolTest.java index 3d620ebf4..2fbae65e4 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolTest.java +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolTest.java @@ -21,8 +21,8 @@ package org.onap.policy.apex.plugins.event.protocol.yaml; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; import java.io.File; import java.io.FileInputStream; @@ -215,13 +215,8 @@ public class YamlEventProtocolTest { */ @Test public void testYamlProcessing() throws ApexEventException, IOException { - try { - testYamlDecodeEncode("TestEvent0", 1, 0, "Empty0"); - fail("test should fail here"); - } catch (ApexEventException e) { - assertEquals("event processing failed, event is null", e.getMessage()); - } - + assertThatThrownBy(() -> testYamlDecodeEncode("TestEvent0", 1, 0, "Empty0")) + .hasMessage("event processing failed, event is null"); testYamlDecodeEncode("TestEvent0", 1, 0, "Empty1"); testYamlDecodeEncode("TestEvent1", 1, 1, "Collection0"); testYamlDecodeEncode("TestEvent2", 1, 3, "Collection1"); |