From 50dd3c933e8b1e84d64389a49f781261ece432e0 Mon Sep 17 00:00:00 2001 From: Frank Maritato Date: Thu, 29 Oct 2009 18:02:27 +0000 Subject: [PATCH] fixed screw up for tests git-svn-id: https://lwes.svn.sourceforge.net/svnroot/lwes/lwes-java/trunk@251 a2f82657-cdd2-4550-bd36-68a8e7111808 --- src/test/{ => java/org}/lwes/EventTest.java | 0 .../org/lwes/db/ArrayTest.esf} | 6 ++-- src/test/java/org/lwes/db/ArrayTest.java | 35 ++++++++++++++++++++++ .../{ => java/org}/lwes/db/EventTemplateDBTest.esf | 0 .../org}/lwes/db/EventTemplateDBTest.java | 2 +- .../lwes/emitter/MockMulticastEventEmitter.java | 0 .../lwes/emitter/MulticastEventEmitterTest.java | 0 .../org}/lwes/serializer/StringParserTest.java | 0 src/test/{ => java/org}/lwes/test/TestEmitter.java | 0 .../{ => java/org}/lwes/test/TestListener.java | 0 .../org}/lwes/util/CharacterEncodingTest.java | 0 .../{ => java/org}/lwes/util/IPAddressTest.java | 0 .../{ => java/org}/lwes/util/NumberCodecTest.java | 0 13 files changed, 40 insertions(+), 3 deletions(-) rename src/test/{ => java/org}/lwes/EventTest.java (100%) copy src/test/{lwes/db/EventTemplateDBTest.esf => java/org/lwes/db/ArrayTest.esf} (82%) create mode 100644 src/test/java/org/lwes/db/ArrayTest.java rename src/test/{ => java/org}/lwes/db/EventTemplateDBTest.esf (100%) rename src/test/{ => java/org}/lwes/db/EventTemplateDBTest.java (98%) rename src/test/{ => java/org}/lwes/emitter/MockMulticastEventEmitter.java (100%) rename src/test/{ => java/org}/lwes/emitter/MulticastEventEmitterTest.java (100%) rename src/test/{ => java/org}/lwes/serializer/StringParserTest.java (100%) rename src/test/{ => java/org}/lwes/test/TestEmitter.java (100%) rename src/test/{ => java/org}/lwes/test/TestListener.java (100%) rename src/test/{ => java/org}/lwes/util/CharacterEncodingTest.java (100%) rename src/test/{ => java/org}/lwes/util/IPAddressTest.java (100%) rename src/test/{ => java/org}/lwes/util/NumberCodecTest.java (100%) diff --git a/src/test/lwes/EventTest.java b/src/test/java/org/lwes/EventTest.java similarity index 100% rename from src/test/lwes/EventTest.java rename to src/test/java/org/lwes/EventTest.java diff --git a/src/test/lwes/db/EventTemplateDBTest.esf b/src/test/java/org/lwes/db/ArrayTest.esf similarity index 82% copy from src/test/lwes/db/EventTemplateDBTest.esf copy to src/test/java/org/lwes/db/ArrayTest.esf index 6fde0ce..c55d4c7 100644 --- a/src/test/lwes/db/EventTemplateDBTest.esf +++ b/src/test/java/org/lwes/db/ArrayTest.esf @@ -10,6 +10,8 @@ MetaEventInfo TestEvent { - string field1; - int64 field2; + string field1[10]; + int64 field2[5]; + string field3; + int32 field4; } \ No newline at end of file diff --git a/src/test/java/org/lwes/db/ArrayTest.java b/src/test/java/org/lwes/db/ArrayTest.java new file mode 100644 index 0000000..335932c --- /dev/null +++ b/src/test/java/org/lwes/db/ArrayTest.java @@ -0,0 +1,35 @@ +package org.lwes.db; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import org.junit.Ignore; + +import java.io.File; +import java.util.Enumeration; + +/** + * @author fmaritato + */ + +@Ignore +public class ArrayTest { + + private static final String ESF = "tests/org/lwes/db/ArrayTest.esf"; + private static final String TEST_EVENT = "TestEvent"; + + public void testArrayParse() { + + EventTemplateDB template = new EventTemplateDB(); + template.setESFFile(new File(ESF)); + assertTrue("Template did not initialize", template.initialize()); + + Enumeration eventNames = template.getEventNames(); + assertNotNull("Event names enum was null", eventNames); + + assertTrue("TestEvent was not known to the template", + template.checkForEvent(TEST_EVENT)); + + assertTrue("field1 attribute not known to the template", + template.checkForAttribute(TEST_EVENT, "field1")); + } +} diff --git a/src/test/lwes/db/EventTemplateDBTest.esf b/src/test/java/org/lwes/db/EventTemplateDBTest.esf similarity index 100% rename from src/test/lwes/db/EventTemplateDBTest.esf rename to src/test/java/org/lwes/db/EventTemplateDBTest.esf diff --git a/src/test/lwes/db/EventTemplateDBTest.java b/src/test/java/org/lwes/db/EventTemplateDBTest.java similarity index 98% rename from src/test/lwes/db/EventTemplateDBTest.java rename to src/test/java/org/lwes/db/EventTemplateDBTest.java index 8e3b6a1..ad4d743 100644 --- a/src/test/lwes/db/EventTemplateDBTest.java +++ b/src/test/java/org/lwes/db/EventTemplateDBTest.java @@ -20,7 +20,7 @@ import java.util.Map; public class EventTemplateDBTest { - private static final String ESF = "tests/org/lwes/db/EventTemplateDBTest.esf"; + private static final String ESF = "src/test/java/org/lwes/db/EventTemplateDBTest.esf"; private static final String TEST_EVENT = "TestEvent"; @Test diff --git a/src/test/lwes/emitter/MockMulticastEventEmitter.java b/src/test/java/org/lwes/emitter/MockMulticastEventEmitter.java similarity index 100% rename from src/test/lwes/emitter/MockMulticastEventEmitter.java rename to src/test/java/org/lwes/emitter/MockMulticastEventEmitter.java diff --git a/src/test/lwes/emitter/MulticastEventEmitterTest.java b/src/test/java/org/lwes/emitter/MulticastEventEmitterTest.java similarity index 100% rename from src/test/lwes/emitter/MulticastEventEmitterTest.java rename to src/test/java/org/lwes/emitter/MulticastEventEmitterTest.java diff --git a/src/test/lwes/serializer/StringParserTest.java b/src/test/java/org/lwes/serializer/StringParserTest.java similarity index 100% rename from src/test/lwes/serializer/StringParserTest.java rename to src/test/java/org/lwes/serializer/StringParserTest.java diff --git a/src/test/lwes/test/TestEmitter.java b/src/test/java/org/lwes/test/TestEmitter.java similarity index 100% rename from src/test/lwes/test/TestEmitter.java rename to src/test/java/org/lwes/test/TestEmitter.java diff --git a/src/test/lwes/test/TestListener.java b/src/test/java/org/lwes/test/TestListener.java similarity index 100% rename from src/test/lwes/test/TestListener.java rename to src/test/java/org/lwes/test/TestListener.java diff --git a/src/test/lwes/util/CharacterEncodingTest.java b/src/test/java/org/lwes/util/CharacterEncodingTest.java similarity index 100% rename from src/test/lwes/util/CharacterEncodingTest.java rename to src/test/java/org/lwes/util/CharacterEncodingTest.java diff --git a/src/test/lwes/util/IPAddressTest.java b/src/test/java/org/lwes/util/IPAddressTest.java similarity index 100% rename from src/test/lwes/util/IPAddressTest.java rename to src/test/java/org/lwes/util/IPAddressTest.java diff --git a/src/test/lwes/util/NumberCodecTest.java b/src/test/java/org/lwes/util/NumberCodecTest.java similarity index 100% rename from src/test/lwes/util/NumberCodecTest.java rename to src/test/java/org/lwes/util/NumberCodecTest.java -- 2.11.4.GIT