From 0f33a5a77ef16432ff9ced2f90b9df858fd106b5 Mon Sep 17 00:00:00 2001 From: Willem Date: Thu, 24 Feb 2022 02:37:00 +0100 Subject: [PATCH] Fixed warp-ship xml --- .../META-INF/warp-ship/warp-ship-lang.eld | 5 ++- .../src/resources/META-INF/x4o-drivers.xml | 2 +- .../warpme/ship/WaterDeviceDriverTest.java | 31 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 lib-warpme/src/test/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java diff --git a/lib-warpme/src/resources/META-INF/warp-ship/warp-ship-lang.eld b/lib-warpme/src/resources/META-INF/warp-ship/warp-ship-lang.eld index e2714594..5dbab3dc 100644 --- a/lib-warpme/src/resources/META-INF/warp-ship/warp-ship-lang.eld +++ b/lib-warpme/src/resources/META-INF/warp-ship/warp-ship-lang.eld @@ -33,7 +33,10 @@ description="Language namespace to store the warp ship." name="WarpShip Language Namespace" id="boot"> + objectClass="love.distributedrebirth.warpme.ship.WaterShip" > + + + diff --git a/lib-warpme/src/resources/META-INF/x4o-drivers.xml b/lib-warpme/src/resources/META-INF/x4o-drivers.xml index bd66f172..3ae7e080 100644 --- a/lib-warpme/src/resources/META-INF/x4o-drivers.xml +++ b/lib-warpme/src/resources/META-INF/x4o-drivers.xml @@ -7,5 +7,5 @@ - + diff --git a/lib-warpme/src/test/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java b/lib-warpme/src/test/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java new file mode 100644 index 00000000..7691a95d --- /dev/null +++ b/lib-warpme/src/test/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java @@ -0,0 +1,31 @@ +package love.distributedrebirth.warpme.ship; + +import java.io.IOException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.x4o.xml.io.X4OConnectionException; +import org.xml.sax.SAXException; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class WaterDeviceDriverTest { + + @Test + public void testWaterDevice() throws X4OConnectionException, SAXException, IOException { + WaterDevice device = new WaterDevice(); + + WaterShip ship = new WaterShip(); + ship.setName("tos4-mark1"); + ship.setEngine("123349858934"); + ship.addShipOcean(new WaterShipOcean("2349058490584")); + ship.addShipOcean(new WaterShipOcean("7867834823244")); + ship.addShipOcean(new WaterShipOcean("3948758927389")); + + device.buildShip(ship); + + Assertions.assertNotNull(device); + WaterDeviceDriver.newInstance().createWriter().writeFile(device, new java.io.File("build/out-ship.xml")); + } +} \ No newline at end of file