Used normal static code WarpManifestorDriver

This commit is contained in:
Willem Cazander 2024-12-28 02:45:26 +01:00
parent 4a04130cf2
commit 4b8439a55c
19 changed files with 156 additions and 148 deletions

View file

@ -72,7 +72,8 @@ import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18Import;
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注; import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") @DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
@ -263,14 +264,17 @@ public class Java3Seed extends PrintStream {
if (file.equals("/META-INF/MANIFEST.MF")) { if (file.equals("/META-INF/MANIFEST.MF")) {
System.out.println("jar: " + jar.getName()); System.out.println("jar: " + jar.getName());
InputStream in = jar.get(path).getAsset().openStream(); InputStream in = jar.get(path).getAsset().openStream();
WarpManifestX8 manifest = WarpManifestorDriver..readV1Stream(in); WarpManifestX8 manifestX8 = WarpManifestorDriver.readV1Stream(in);
in.close(); in.close();
jar.delete(path); jar.delete(path);
manifest.withAttribute("Manifest-Toilet-Cleaned-By", Java3Seed.class.getName()); manifestX8.withAttribute("Manifest-Toilet-Cleaned-By", Java3Seed.class.getName());
manifest.withAttribute("Manifest-Toilet-Cleaned-Date", toiletCleanDate); manifestX8.withAttribute("Manifest-Toilet-Cleaned-Date", toiletCleanDate);
jar.add(new StringAsset(WarpManifestorDriver..writeV1String(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_1.getQFileName()); WarpManifestX18 manifestX18 = WarpManifestX18Import.fromX8(manifestX8);
jar.add(new StringAsset(WarpManifestorDriver..writeV2String(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_2.getQFileName()); jar.add(new StringAsset(WarpManifestorDriver.writeV1String(manifestX8)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_1.getQFileName());
jar.add(new ByteArrayAsset(WarpManifestorDriver..writeV3Array(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_3.getQFileName()); jar.add(new StringAsset(WarpManifestorDriver.writeV2String(manifestX8)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_2.getQFileName());
jar.add(new ByteArrayAsset(WarpManifestorDriver.writeV3Array(manifestX8)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_3.getQFileName());
jar.add(new ByteArrayAsset(WarpManifestorDriver.writeV4Array(manifestX18)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_4.getQFileName());
jar.add(new ByteArrayAsset(WarpManifestorDriver.writeV5Array(manifestX8)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_5.getQFileName());
convertedManifests++; convertedManifests++;
} }
} }

View file

@ -54,13 +54,13 @@ public enum ZilLaLaManyfestoGrowlFactory {
buf.append(")"); buf.append(")");
} }
buf.append(VALUE_WHITE_SPACE); buf.append(VALUE_WHITE_SPACE);
buf.append(WarpManifestorDriver..writeV2String(manifest)); buf.append(WarpManifestorDriver.writeV2String(manifest));
return buf.toString(); return buf.toString();
} }
@Deprecated @Deprecated
public String buildFaultScreamBase64(WarpManifestX8 manifest, BassFaultAnchor fault) { public String buildFaultScreamBase64(WarpManifestX8 manifest, BassFaultAnchor fault) {
byte[] traceManifestBytes = WarpManifestorDriver..writeV3Array(manifest); // TODO: Upgrade to version 6 or 7 ?? byte[] traceManifestBytes = WarpManifestorDriver.writeV3Array(manifest); // TODO: Upgrade to version 6 or 7 ??
String trace64 = Base64.getEncoder().encodeToString(traceManifestBytes); // FIXME: report as "normal" text in nostr event String trace64 = Base64.getEncoder().encodeToString(traceManifestBytes); // FIXME: report as "normal" text in nostr event
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
// TODO: Move base data uri + nostr data uri to provider interface // TODO: Move base data uri + nostr data uri to provider interface

View file

@ -30,9 +30,6 @@ package love.distributedrebirth.nx01.warp.fault;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.fault.FaultBeanInstantiation;
import love.distributedrebirth.nx01.warp.fault.FaultBeanState;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
@ -114,7 +111,7 @@ public class FaultSignalTraceTest {
Assertions.assertNotNull(error); Assertions.assertNotNull(error);
Assertions.assertNotNull(error.getMessage()); Assertions.assertNotNull(error.getMessage());
WarpManifestX8 manifest = error.toZilLaLaManyfesto(); WarpManifestX8 manifest = error.toZilLaLaManyfesto();
String sitraText = WarpManifestorDriver..writeV2String(manifest); String sitraText = WarpManifestorDriver.writeV2String(manifest);
//System.out.println(sitraText); //System.out.println(sitraText);
Assertions.assertNotNull(sitraText); Assertions.assertNotNull(sitraText);
Assertions.assertTrue(sitraText.contains("Manifest")); Assertions.assertTrue(sitraText.contains("Manifest"));

View file

@ -67,22 +67,24 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.iomf5.ScopicManifest5
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public enum WarpManifestorDriver { public final class WarpManifestorDriver {
;
public WarpManifestX8 readV1String(String input) { private WarpManifestorDriver() {
}
static public WarpManifestX8 readV1String(String input) {
return readV1Array(input.getBytes(StandardCharsets.UTF_8)); return readV1Array(input.getBytes(StandardCharsets.UTF_8));
} }
public WarpManifestX8 readV1Buffer(ByteBuffer input) { static public WarpManifestX8 readV1Buffer(ByteBuffer input) {
return readV1Array(input.array()); return readV1Array(input.array());
} }
public WarpManifestX8 readV1Array(byte[] input) { static public WarpManifestX8 readV1Array(byte[] input) {
return readV1Stream(new ByteArrayInputStream(input)); return readV1Stream(new ByteArrayInputStream(input));
} }
public WarpManifestX8 readV1Stream(InputStream input) { static public WarpManifestX8 readV1Stream(InputStream input) {
WarpManifestX8 result = new WarpManifestX8(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0);
ScopicManifestContentReader reader = new ScopicManifestContentReader(handler, ScopicManifestContentReader.FORCE_VERSION_1_0); ScopicManifestContentReader reader = new ScopicManifestContentReader(handler, ScopicManifestContentReader.FORCE_VERSION_1_0);
@ -94,19 +96,19 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifestX8 readV2String(String input) { static public WarpManifestX8 readV2String(String input) {
return readV2Array(input.getBytes(StandardCharsets.UTF_8)); return readV2Array(input.getBytes(StandardCharsets.UTF_8));
} }
public WarpManifestX8 readV2Buffer(ByteBuffer input) { static public WarpManifestX8 readV2Buffer(ByteBuffer input) {
return readV2Array(input.array()); return readV2Array(input.array());
} }
public WarpManifestX8 readV2Array(byte[] input) { static public WarpManifestX8 readV2Array(byte[] input) {
return readV2Stream(new ByteArrayInputStream(input)); return readV2Stream(new ByteArrayInputStream(input));
} }
public WarpManifestX8 readV2Stream(InputStream input) { static public WarpManifestX8 readV2Stream(InputStream input) {
WarpManifestX8 result = new WarpManifestX8(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0, WarpManifestX0TheVersion.VERSION_2_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0, WarpManifestX0TheVersion.VERSION_2_0);
ScopicManifestContentReader reader = new ScopicManifestContentReader(handler); ScopicManifestContentReader reader = new ScopicManifestContentReader(handler);
@ -118,15 +120,15 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifestX8 readV3Buffer(ByteBuffer input) { static public WarpManifestX8 readV3Buffer(ByteBuffer input) {
return readV3Array(input.array()); return readV3Array(input.array());
} }
public WarpManifestX8 readV3Array(byte[] input) { static public WarpManifestX8 readV3Array(byte[] input) {
return readV3Stream(new ByteArrayInputStream(input)); return readV3Stream(new ByteArrayInputStream(input));
} }
public WarpManifestX8 readV3Stream(InputStream input) { static public WarpManifestX8 readV3Stream(InputStream input) {
WarpManifestX8 result = new WarpManifestX8(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_3_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_3_0);
ScopicManifest3ContentReader reader = new ScopicManifest3ContentReader(handler); ScopicManifest3ContentReader reader = new ScopicManifest3ContentReader(handler);
@ -144,15 +146,15 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifestX18 readV4Buffer(ByteBuffer input) { static public WarpManifestX18 readV4Buffer(ByteBuffer input) {
return readV4Array(input.array()); return readV4Array(input.array());
} }
public WarpManifestX18 readV4Array(byte[] input) { static public WarpManifestX18 readV4Array(byte[] input) {
return readV4Stream(new ByteArrayInputStream(input)); return readV4Stream(new ByteArrayInputStream(input));
} }
public WarpManifestX18 readV4Stream(InputStream input) { static public WarpManifestX18 readV4Stream(InputStream input) {
WarpManifestX18 result = new WarpManifestX18(); WarpManifestX18 result = new WarpManifestX18();
ScopicManifest4ContentHandler handler = new ScopicManifest4ContentHandler(result); ScopicManifest4ContentHandler handler = new ScopicManifest4ContentHandler(result);
ScopicManifest4ContentReader reader = new ScopicManifest4ContentReader(handler); ScopicManifest4ContentReader reader = new ScopicManifest4ContentReader(handler);
@ -170,15 +172,15 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifestX8 readV5Buffer(ByteBuffer input) { static public WarpManifestX8 readV5Buffer(ByteBuffer input) {
return readV5Array(input.array()); return readV5Array(input.array());
} }
public WarpManifestX8 readV5Array(byte[] input) { static public WarpManifestX8 readV5Array(byte[] input) {
return readV5Stream(new ByteArrayInputStream(input)); return readV5Stream(new ByteArrayInputStream(input));
} }
public WarpManifestX8 readV5Stream(InputStream input) { static public WarpManifestX8 readV5Stream(InputStream input) {
WarpManifestX8 result = new WarpManifestX8(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_5_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_5_0);
ScopicManifest5ContentParser contentParser = new ScopicManifest5ContentParser(handler); ScopicManifest5ContentParser contentParser = new ScopicManifest5ContentParser(handler);
@ -191,19 +193,19 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifestX8 readViniString(String input) { static public WarpManifestX8 readViniString(String input) {
return readViniArray(input.getBytes(StandardCharsets.UTF_8)); return readViniArray(input.getBytes(StandardCharsets.UTF_8));
} }
public WarpManifestX8 readViniBuffer(ByteBuffer input) { static public WarpManifestX8 readViniBuffer(ByteBuffer input) {
return readViniArray(input.array()); return readViniArray(input.array());
} }
public WarpManifestX8 readViniArray(byte[] input) { static public WarpManifestX8 readViniArray(byte[] input) {
return readViniStream(new ByteArrayInputStream(input)); return readViniStream(new ByteArrayInputStream(input));
} }
public WarpManifestX8 readViniStream(InputStream input) { static public WarpManifestX8 readViniStream(InputStream input) {
WarpManifestX8 result = new WarpManifestX8(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result);
ScopicIniContentReader reader = new ScopicIniContentReader(handler); ScopicIniContentReader reader = new ScopicIniContentReader(handler);
@ -217,45 +219,45 @@ public enum WarpManifestorDriver {
// ================================================================================================================= // =================================================================================================================
public String writeV1String(WarpManifestX8 manifest) { static public String writeV1String(WarpManifestX8 manifest) {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
writeV1StreamChar(manifest, writer); writeV1StreamChar(manifest, writer);
return writer.toString(); return writer.toString();
} }
public void writeV1Stream(WarpManifestX8 manifest, OutputStream output) { static public void writeV1Stream(WarpManifestX8 manifest, OutputStream output) {
writeV1StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8)); writeV1StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8));
} }
public void writeV1StreamChar(WarpManifestX8 manifest, Writer output) { static public void writeV1StreamChar(WarpManifestX8 manifest, Writer output) {
ScopicManifestContentPulser.strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_1_0.getQName()); ScopicManifestContentPulser.strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_1_0.getQName());
} }
public String writeV2String(WarpManifestX8 manifest) { static public String writeV2String(WarpManifestX8 manifest) {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
writeV2StreamChar(manifest, writer); writeV2StreamChar(manifest, writer);
return writer.toString(); return writer.toString();
} }
public void writeV2Stream(WarpManifestX8 manifest, OutputStream output) { static public void writeV2Stream(WarpManifestX8 manifest, OutputStream output) {
writeV2StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8)); writeV2StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8));
} }
public void writeV2StreamChar(WarpManifestX8 manifest, Writer output) { static public void writeV2StreamChar(WarpManifestX8 manifest, Writer output) {
ScopicManifestContentPulser.strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_2_0.getQName()); ScopicManifestContentPulser.strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_2_0.getQName());
} }
public ByteBuffer writeV3Buffer(WarpManifestX8 manifest) { static public ByteBuffer writeV3Buffer(WarpManifestX8 manifest) {
return ByteBuffer.wrap(writeV3Array(manifest)); return ByteBuffer.wrap(writeV3Array(manifest));
} }
public byte[] writeV3Array(WarpManifestX8 manifest) { static public byte[] writeV3Array(WarpManifestX8 manifest) {
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeV3Stream(manifest, baos); writeV3Stream(manifest, baos);
return baos.toByteArray(); return baos.toByteArray();
} }
public void writeV3Stream(WarpManifestX8 manifest, OutputStream output) { static public void writeV3Stream(WarpManifestX8 manifest, OutputStream output) {
TLVChainSexTeenBit chain = new TLVChainSexTeenBit(); TLVChainSexTeenBit chain = new TLVChainSexTeenBit();
ScopicManifestContentPulser.strobelight(manifest, new ScopicManifest3ContentWriter(chain), WarpManifestX0TheVersion.VERSION_3_0.getQName()); ScopicManifestContentPulser.strobelight(manifest, new ScopicManifest3ContentWriter(chain), WarpManifestX0TheVersion.VERSION_3_0.getQName());
try { try {
@ -266,17 +268,17 @@ public enum WarpManifestorDriver {
} }
} }
public ByteBuffer writeV4Buffer(WarpManifestX18 manifest) { static public ByteBuffer writeV4Buffer(WarpManifestX18 manifest) {
return ByteBuffer.wrap(writeV4Array(manifest)); return ByteBuffer.wrap(writeV4Array(manifest));
} }
public byte[] writeV4Array(WarpManifestX18 manifest) { static public byte[] writeV4Array(WarpManifestX18 manifest) {
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeV4Stream(manifest, baos); writeV4Stream(manifest, baos);
return baos.toByteArray(); return baos.toByteArray();
} }
public void writeV4Stream(WarpManifestX18 manifest, OutputStream output) { static public void writeV4Stream(WarpManifestX18 manifest, OutputStream output) {
TLVChainOctalSex chain = new TLVChainOctalSex(); TLVChainOctalSex chain = new TLVChainOctalSex();
ScopicManifestContentPulser.strobelight(manifest, new ScopicManifest4ContentWriter(chain), WarpManifestX0TheVersion.VERSION_4_0); ScopicManifestContentPulser.strobelight(manifest, new ScopicManifest4ContentWriter(chain), WarpManifestX0TheVersion.VERSION_4_0);
try { try {
@ -287,33 +289,33 @@ public enum WarpManifestorDriver {
} }
} }
public ByteBuffer writeV5Buffer(WarpManifestX8 manifest) { static public ByteBuffer writeV5Buffer(WarpManifestX8 manifest) {
return ByteBuffer.wrap(writeV5Array(manifest)); return ByteBuffer.wrap(writeV5Array(manifest));
} }
public byte[] writeV5Array(WarpManifestX8 manifest) { static public byte[] writeV5Array(WarpManifestX8 manifest) {
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeV5Stream(manifest, baos); writeV5Stream(manifest, baos);
return baos.toByteArray(); return baos.toByteArray();
} }
public void writeV5Stream(WarpManifestX8 manifest, OutputStream output) { static public void writeV5Stream(WarpManifestX8 manifest, OutputStream output) {
XDBXWriterXml writerXml = new XDBXWriterXml(output); XDBXWriterXml writerXml = new XDBXWriterXml(output);
ScopicManifest5ContentWriter writer = new ScopicManifest5ContentWriter(writerXml); ScopicManifest5ContentWriter writer = new ScopicManifest5ContentWriter(writerXml);
ScopicManifestContentPulser.strobelight(manifest, writer, WarpManifestX0TheVersion.VERSION_5_0.getQName()); ScopicManifestContentPulser.strobelight(manifest, writer, WarpManifestX0TheVersion.VERSION_5_0.getQName());
} }
public String writeViniString(WarpManifestX8 manifest) { static public String writeViniString(WarpManifestX8 manifest) {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
writeViniStreamChar(manifest, writer); writeViniStreamChar(manifest, writer);
return writer.toString(); return writer.toString();
} }
public void writeViniStream(WarpManifestX8 manifest, OutputStream output) { static public void writeViniStream(WarpManifestX8 manifest, OutputStream output) {
writeViniStreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8)); writeViniStreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8));
} }
public void writeViniStreamChar(WarpManifestX8 manifest, Writer output) { static public void writeViniStreamChar(WarpManifestX8 manifest, Writer output) {
ScopicManifestContentPulser.strobelight(manifest, new ScopicIniContentWriter(output), ScopicIniConstants.VERSION_NEW_TESTAMENT); ScopicManifestContentPulser.strobelight(manifest, new ScopicIniContentWriter(output), ScopicIniConstants.VERSION_NEW_TESTAMENT);
} }
} }

View file

@ -33,6 +33,8 @@ import java.io.OutputStream;
import java.util.Arrays; import java.util.Arrays;
import java.util.Optional; import java.util.Optional;
import org.x4o.o2o.io.sax3.xdbx.XDBXConstants;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// Warp manifest 0 bit schema of the mime types and magic markers. /// Warp manifest 0 bit schema of the mime types and magic markers.
@ -45,7 +47,7 @@ public enum WarpManifestX0TheMimeType {
MANIFEST_2 ("application/manifest2", "MF2", null), MANIFEST_2 ("application/manifest2", "MF2", null),
MANIFEST_3 ("application/manifest3", "MF3", new byte[] {0x4d,0x53,0x58,0x33,0x4d,0x46,0x30,0x42}), MANIFEST_3 ("application/manifest3", "MF3", new byte[] {0x4d,0x53,0x58,0x33,0x4d,0x46,0x30,0x42}),
MANIFEST_4 ("application/manifest4", "MF4", new byte[] {0x4d,0x53,0x58,0x34,0x4d,0x53,0x58,0x34,0x2d,0x2d,0x4d,0x46,0x31,0x38,0x4d,0x46,0x31,0x38}), MANIFEST_4 ("application/manifest4", "MF4", new byte[] {0x4d,0x53,0x58,0x34,0x4d,0x53,0x58,0x34,0x2d,0x2d,0x4d,0x46,0x31,0x38,0x4d,0x46,0x31,0x38}),
//MANIFEST_5 ("application/manifest5", "MF5", null), MANIFEST_5 ("application/manifest5", "MF5", XDBXConstants.HEADER_MARKER), // FIXME: marker is not yet used here
//MANIFEST_6 ("application/manifest6", "MF6", null), //MANIFEST_6 ("application/manifest6", "MF6", null),
//MANIFEST_7 ("application/manifest7", "MF7", null), //MANIFEST_7 ("application/manifest7", "MF7", null),
; ;

View file

@ -39,6 +39,9 @@ import org.x4o.o2o.octal.PrimordialOctalOrangeString;
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifestX18Import { public final class WarpManifestX18Import {
private WarpManifestX18Import() {
}
static public WarpManifestX18 fromX8(WarpManifestX8 manifest) { static public WarpManifestX18 fromX8(WarpManifestX8 manifest) {
WarpManifestX18 result = new WarpManifestX18(); WarpManifestX18 result = new WarpManifestX18();
for (WarpManifestX8HeaderField attr : manifest.getAttributes()) { for (WarpManifestX8HeaderField attr : manifest.getAttributes()) {

View file

@ -201,14 +201,14 @@ public class WarpManifestChinaTest {
section.withAttribute("七號線", "不得不服從"); section.withAttribute("七號線", "不得不服從");
section.withAttribute("八號線", "在正義中。"); section.withAttribute("八號線", "在正義中。");
String outputV2 = WarpManifestorDriver..writeV2String(manifest); String outputV2 = WarpManifestorDriver.writeV2String(manifest);
Assertions.assertNotNull(outputV2); Assertions.assertNotNull(outputV2);
String outputIni = WarpManifestorDriver..writeViniString(new WarpManifestX8().withSections(manifest.getSections())); // removes main attributes String outputIni = WarpManifestorDriver.writeViniString(new WarpManifestX8().withSections(manifest.getSections())); // removes main attributes
Assertions.assertNotNull(outputIni); Assertions.assertNotNull(outputIni);
byte[] outputV5 = WarpManifestorDriver..writeV5Array(manifest); byte[] outputV5 = WarpManifestorDriver.writeV5Array(manifest);
Assertions.assertNotNull(outputV5); Assertions.assertNotNull(outputV5);
WarpManifestX8 manifestV5 = WarpManifestorDriver..readV5Array(outputV5); WarpManifestX8 manifestV5 = WarpManifestorDriver.readV5Array(outputV5);
StringWriter outputXml = new StringWriter(); StringWriter outputXml = new StringWriter();
ContentWriterXml writerXml = new ContentWriterXml(outputXml); ContentWriterXml writerXml = new ContentWriterXml(outputXml);
ScopicManifest5ContentWriter writer = new ScopicManifest5ContentWriter(writerXml); ScopicManifest5ContentWriter writer = new ScopicManifest5ContentWriter(writerXml);

View file

@ -45,7 +45,7 @@ public class WarpManifestorDriverTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute("foo", "bar"); manifest.makeAttribute("foo", "bar");
manifest.makeSection("my1").withAttribute("foo1", "bar1"); manifest.makeSection("my1").withAttribute("foo1", "bar1");
String output = WarpManifestorDriver..writeV1String(manifest); String output = WarpManifestorDriver.writeV1String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
Assertions.assertTrue(output.contains("foo1")); Assertions.assertTrue(output.contains("foo1"));
} }
@ -54,7 +54,7 @@ public class WarpManifestorDriverTest {
public void testLineWrapAsLastLine() { public void testLineWrapAsLastLine() {
String checkWrap = "https://github.com/shrinkwrap/resolver/shrinkwrap-resolver-spi-maven-archive"; String checkWrap = "https://github.com/shrinkwrap/resolver/shrinkwrap-resolver-spi-maven-archive";
String checkWrapLast = "http://www.jboss.org/shrinkwrap-resolver-parent/shrinkwrap-resolver-spi-maven-archive"; String checkWrapLast = "http://www.jboss.org/shrinkwrap-resolver-parent/shrinkwrap-resolver-spi-maven-archive";
WarpManifestX8 manitest = WarpManifestorDriver..readV1Stream(getClass().getResourceAsStream("test-line-wrap.mf")); WarpManifestX8 manitest = WarpManifestorDriver.readV1Stream(getClass().getResourceAsStream("test-line-wrap.mf"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(21, manitest.getAttributes().size()); Assertions.assertEquals(21, manitest.getAttributes().size());
Assertions.assertEquals("Implementation-Title", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("Implementation-Title", manitest.getAttributes().get(0).getName());
@ -64,16 +64,16 @@ public class WarpManifestorDriverTest {
@Test @Test
public void testSizeOfVersions() { public void testSizeOfVersions() {
WarpManifestX8 manitest = WarpManifestorDriver..readV1Stream(getClass().getResourceAsStream("test-line-wrap.mf")); WarpManifestX8 manitest = WarpManifestorDriver.readV1Stream(getClass().getResourceAsStream("test-line-wrap.mf"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
WarpManifestX18 manitestX18 = WarpManifestX18Import.fromX8(manitest); WarpManifestX18 manitestX18 = WarpManifestX18Import.fromX8(manitest);
Assertions.assertNotNull(manitestX18); Assertions.assertNotNull(manitestX18);
System.out.println("size-OF: " + manitest.getAttributeBodyNullable("Implementation-Vendor-Id")); System.out.println("size-OF: " + manitest.getAttributeBodyNullable("Implementation-Vendor-Id"));
System.out.println("size-V1: " + WarpManifestorDriver..writeV1String(manitest).getBytes(StandardCharsets.UTF_8).length); System.out.println("size-V1: " + WarpManifestorDriver.writeV1String(manitest).getBytes(StandardCharsets.UTF_8).length);
System.out.println("size-V2: " + WarpManifestorDriver..writeV2String(manitest).getBytes(StandardCharsets.UTF_8).length); System.out.println("size-V2: " + WarpManifestorDriver.writeV2String(manitest).getBytes(StandardCharsets.UTF_8).length);
System.out.println("size-V3: " + WarpManifestorDriver..writeV3Array(manitest).length); System.out.println("size-V3: " + WarpManifestorDriver.writeV3Array(manitest).length);
System.out.println("size-V4: " + WarpManifestorDriver..writeV4Array(manitestX18).length); System.out.println("size-V4: " + WarpManifestorDriver.writeV4Array(manitestX18).length);
System.out.println("size-V5: " + WarpManifestorDriver..writeV5Array(manitest).length); System.out.println("size-V5: " + WarpManifestorDriver.writeV5Array(manitest).length);
} }
} }

View file

@ -38,17 +38,17 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadSystemdService() { public void testViniReadSystemdService() {
WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-ntp.service")); WarpManifestX8 manitest = WarpManifestorDriver.readViniStream(getClass().getResourceAsStream("ini/test-ntp.service"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals(3, manitest.getSections().size());
Assertions.assertEquals("Network Time Service", manitest.getSectionAttributeBodyNullable("Unit", "Description")); Assertions.assertEquals("Network Time Service", manitest.getSectionAttributeBodyNullable("Unit", "Description"));
Assertions.assertEquals("man:ntpd(8)", manitest.getSectionAttributeBodyNullable("Unit", "Documentation")); Assertions.assertEquals("man:ntpd(8)", manitest.getSectionAttributeBodyNullable("Unit", "Documentation"));
//System.out.println(WarpManifestorDriver..writeViniString(manitest)); //System.out.println(WarpManifestorDriver.writeViniString(manitest));
} }
@Test @Test
public void testViniReadSimple() { public void testViniReadSimple() {
WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-simple.ini")); WarpManifestX8 manitest = WarpManifestorDriver.readViniStream(getClass().getResourceAsStream("ini/test-simple.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals(3, manitest.getSections().size());
@ -69,7 +69,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadFruitFolding() { public void testViniReadFruitFolding() {
WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini")); WarpManifestX8 manitest = WarpManifestorDriver.readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(6, manitest.getSections().size()); Assertions.assertEquals(6, manitest.getSections().size());
@ -93,9 +93,9 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniWriteFruitFolding() { public void testViniWriteFruitFolding() {
WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini")); WarpManifestX8 manitest = WarpManifestorDriver.readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
String strini = WarpManifestorDriver..writeViniString(manitest); String strini = WarpManifestorDriver.writeViniString(manitest);
Assertions.assertTrue(strini.contains("target region = Bay Area")); Assertions.assertTrue(strini.contains("target region = Bay Area"));
Assertions.assertTrue(strini.contains("# TODO: advertise vacant positions")); Assertions.assertTrue(strini.contains("# TODO: advertise vacant positions"));
Assertions.assertTrue(strini.contains("Trademark Issues = truly unlikely")); Assertions.assertTrue(strini.contains("Trademark Issues = truly unlikely"));
@ -107,7 +107,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadEscQuote() { public void testViniReadEscQuote() {
WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-esc-quote.ini")); WarpManifestX8 manitest = WarpManifestorDriver.readViniStream(getClass().getResourceAsStream("ini/test-esc-quote.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals(3, manitest.getSections().size());

View file

@ -47,7 +47,7 @@ public class WarpManifestBigBodyTest {
} }
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("long-longer-longggger", buf.toString()); manifest.withAttribute("long-longer-longggger", buf.toString());
String output = WarpManifestorDriver..writeV1String(manifest); String output = WarpManifestorDriver.writeV1String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
String lines[] = output.split("\n"); String lines[] = output.split("\n");
Assertions.assertEquals(31, lines.length); Assertions.assertEquals(31, lines.length);
@ -63,15 +63,15 @@ public class WarpManifestBigBodyTest {
} }
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("long-longer-longggger", buf.toString()); manifest.withAttribute("long-longer-longggger", buf.toString());
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver.writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
String lines[] = output.split("\n"); String lines[] = output.split("\n");
Assertions.assertEquals(2, lines.length); Assertions.assertEquals(2, lines.length);
Assertions.assertEquals(21, lines[0].length()); Assertions.assertEquals(21, lines[0].length());
Assertions.assertEquals(2071, lines[1].getBytes(StandardCharsets.UTF_8).length); Assertions.assertEquals(2071, lines[1].getBytes(StandardCharsets.UTF_8).length);
String outputV1 = WarpManifestorDriver..writeV1String(manifest); String outputV1 = WarpManifestorDriver.writeV1String(manifest);
WarpManifestX8 manitestV1 = WarpManifestorDriver..readV2String(outputV1); WarpManifestX8 manitestV1 = WarpManifestorDriver.readV2String(outputV1);
Assertions.assertNotNull(manitestV1); Assertions.assertNotNull(manitestV1);
Assertions.assertEquals(1, manitestV1.getAttributes().size()); Assertions.assertEquals(1, manitestV1.getAttributes().size());
} }
@ -84,13 +84,13 @@ public class WarpManifestBigBodyTest {
} }
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("limit-lines", buf.toString()); manifest.withAttribute("limit-lines", buf.toString());
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver.writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifestX8 manifestClone = WarpManifestorDriver..readV3Array(output); WarpManifestX8 manifestClone = WarpManifestorDriver.readV3Array(output);
Assertions.assertEquals(manifest.getAttributes().get(0).getBody(), manifestClone.getAttributes().get(0).getBody()); Assertions.assertEquals(manifest.getAttributes().get(0).getBody(), manifestClone.getAttributes().get(0).getBody());
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
manifest.withAttribute("limit-lines", "1" + buf.toString()); manifest.withAttribute("limit-lines", "1" + buf.toString());
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
} }

View file

@ -42,7 +42,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\n"); manifest.withAttribute("foo", "bar\n");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -51,7 +51,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\r"); manifest.withAttribute("foo", "bar\r");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -60,7 +60,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\u0000"); manifest.withAttribute("foo", "bar\u0000");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -69,7 +69,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\n"); manifest.withAttribute("foo", "bar\n");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -78,7 +78,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\r"); manifest.withAttribute("foo", "bar\r");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -87,7 +87,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\u0000"); manifest.withAttribute("foo", "bar\u0000");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -96,7 +96,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\n"); manifest.withAttribute("foo", "bar\n");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -105,7 +105,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\r"); manifest.withAttribute("foo", "bar\r");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -114,7 +114,7 @@ public class WarpManifestBodyIllegalTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\u0000"); manifest.withAttribute("foo", "bar\u0000");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
} }

View file

@ -46,7 +46,7 @@ public class WarpManifestNameDupTest {
manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar1");
manifest.withAttribute("foo", "bar2"); manifest.withAttribute("foo", "bar2");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -56,7 +56,7 @@ public class WarpManifestNameDupTest {
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -65,7 +65,7 @@ public class WarpManifestNameDupTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -75,7 +75,7 @@ public class WarpManifestNameDupTest {
manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar1");
manifest.withAttribute("foo", "bar2"); manifest.withAttribute("foo", "bar2");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -85,7 +85,7 @@ public class WarpManifestNameDupTest {
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -94,7 +94,7 @@ public class WarpManifestNameDupTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -104,7 +104,7 @@ public class WarpManifestNameDupTest {
manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar1");
manifest.withAttribute("foo", "bar2"); manifest.withAttribute("foo", "bar2");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -114,7 +114,7 @@ public class WarpManifestNameDupTest {
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -123,7 +123,7 @@ public class WarpManifestNameDupTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -133,7 +133,7 @@ public class WarpManifestNameDupTest {
manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver.writeV4Array(manifest);
}); });
} }
@ -143,7 +143,7 @@ public class WarpManifestNameDupTest {
manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver.writeV4Array(manifest);
}); });
} }
@ -154,7 +154,7 @@ public class WarpManifestNameDupTest {
.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))) .withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)))
.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); .withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver.writeV4Array(manifest);
}); });
} }
@ -164,7 +164,7 @@ public class WarpManifestNameDupTest {
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
@ -173,7 +173,7 @@ public class WarpManifestNameDupTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
} }

View file

@ -45,7 +45,7 @@ public class WarpManifestNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -54,7 +54,7 @@ public class WarpManifestNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -63,7 +63,7 @@ public class WarpManifestNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -72,7 +72,7 @@ public class WarpManifestNameEmptyTest {
WarpManifestX18 manifest = new WarpManifestX18(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.withAttribute(PrimordialOctalOrangeString.valueOfEmpty(), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(12,34))); manifest.withAttribute(PrimordialOctalOrangeString.valueOfEmpty(), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(12,34)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver.writeV4Array(manifest);
}); });
} }
@ -81,7 +81,7 @@ public class WarpManifestNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
} }

View file

@ -42,7 +42,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -51,7 +51,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -60,7 +60,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -69,7 +69,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -78,7 +78,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -87,7 +87,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -96,7 +96,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -105,7 +105,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -114,7 +114,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -123,7 +123,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
@ -132,7 +132,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
@ -141,7 +141,7 @@ public class WarpManifestNameForbidCharTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
} }

View file

@ -45,10 +45,10 @@ public class WarpManifestNameLimitTest {
} }
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute(buf.toString(), "foo"); manifest.withAttribute(buf.toString(), "foo");
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
manifest.withAttribute(buf.toString() + "1", "bar"); manifest.withAttribute(buf.toString() + "1", "bar");
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -60,13 +60,13 @@ public class WarpManifestNameLimitTest {
} }
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable"); manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver.writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
Assertions.assertTrue(output.contains("foo")); Assertions.assertTrue(output.contains("foo"));
Assertions.assertTrue(output.contains("remarkable")); Assertions.assertTrue(output.contains("remarkable"));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
manifest.withAttribute(buf.toString() + "1", "bar"); manifest.withAttribute(buf.toString() + "1", "bar");
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -78,11 +78,11 @@ public class WarpManifestNameLimitTest {
} }
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable"); manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable");
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver.writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
manifest.withAttribute(buf.toString() + "1", "bar"); manifest.withAttribute(buf.toString() + "1", "bar");
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
} }

View file

@ -42,7 +42,7 @@ public class WarpManifestNameSeperatorTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo:", "bar"); manifest.withAttribute("foo:", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -50,7 +50,7 @@ public class WarpManifestNameSeperatorTest {
public void testWriteV2OutputSeperator() { public void testWriteV2OutputSeperator() {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("ju n it:", "junit:"); manifest.withAttribute("ju n it:", "junit:");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver.writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
Assertions.assertTrue(output.contains("ju n it::")); Assertions.assertTrue(output.contains("ju n it::"));
Assertions.assertTrue(output.contains("junit:")); Assertions.assertTrue(output.contains("junit:"));
@ -60,9 +60,9 @@ public class WarpManifestNameSeperatorTest {
public void testWriteV3OutputSeperator() { public void testWriteV3OutputSeperator() {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("ju n it:", "junit:"); manifest.withAttribute("ju n it:", "junit:");
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver.writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifestX8 manitest = WarpManifestorDriver..readV3Array(output); WarpManifestX8 manitest = WarpManifestorDriver.readV3Array(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(1, manitest.getAttributes().size()); Assertions.assertEquals(1, manitest.getAttributes().size());
Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName());
@ -73,9 +73,9 @@ public class WarpManifestNameSeperatorTest {
public void testWriteV5OutputSeperator() { public void testWriteV5OutputSeperator() {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("ju n it:", "junit:"); manifest.withAttribute("ju n it:", "junit:");
byte[] output = WarpManifestorDriver..writeV5Array(manifest); byte[] output = WarpManifestorDriver.writeV5Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifestX8 manitest = WarpManifestorDriver..readV5Array(output); WarpManifestX8 manitest = WarpManifestorDriver.readV5Array(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(1, manitest.getAttributes().size()); Assertions.assertEquals(1, manitest.getAttributes().size());
Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName());

View file

@ -41,10 +41,10 @@ public class WarpManifestNameUnicodeTest {
public void testWriteV1NameUnicode() { public void testWriteV1NameUnicode() {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
manifest.withAttribute("仙上主天", "bar"); manifest.withAttribute("仙上主天", "bar");
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -53,21 +53,21 @@ public class WarpManifestNameUnicodeTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
manifest.withAttribute("仙上主天", "bar"); manifest.withAttribute("仙上主天", "bar");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver.writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
String lines[] = output.split("\n"); String lines[] = output.split("\n");
Assertions.assertEquals(3, lines.length); Assertions.assertEquals(3, lines.length);
Assertions.assertEquals("foo: 仙上主天", lines[1]); Assertions.assertEquals("foo: 仙上主天", lines[1]);
Assertions.assertEquals("仙上主天: bar", lines[2]); Assertions.assertEquals("仙上主天: bar", lines[2]);
WarpManifestX8 manitest = WarpManifestorDriver..readV2String(output); WarpManifestX8 manitest = WarpManifestorDriver.readV2String(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals(2, manitest.getAttributes().size());
Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName());
Assertions.assertEquals("仙上主天", manitest.getAttributes().get(1).getName()); Assertions.assertEquals("仙上主天", manitest.getAttributes().get(1).getName());
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..readV1String(output); WarpManifestorDriver.readV1String(output);
}); });
} }
@ -76,9 +76,9 @@ public class WarpManifestNameUnicodeTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
manifest.withAttribute("仙上主天", "bar"); manifest.withAttribute("仙上主天", "bar");
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver.writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifestX8 manitest = WarpManifestorDriver..readV3Array(output); WarpManifestX8 manitest = WarpManifestorDriver.readV3Array(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals(2, manitest.getAttributes().size());
Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName());
@ -90,9 +90,9 @@ public class WarpManifestNameUnicodeTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
manifest.withAttribute("仙上主天", "bar"); manifest.withAttribute("仙上主天", "bar");
byte[] output = WarpManifestorDriver..writeV5Array(manifest); byte[] output = WarpManifestorDriver.writeV5Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifestX8 manitest = WarpManifestorDriver..readV5Array(output); WarpManifestX8 manitest = WarpManifestorDriver.readV5Array(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals(2, manitest.getAttributes().size());
Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName());

View file

@ -45,7 +45,7 @@ public class WarpManifestSectionNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver.writeV1String(manifest);
}); });
} }
@ -54,7 +54,7 @@ public class WarpManifestSectionNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver.writeV2String(manifest);
}); });
} }
@ -63,7 +63,7 @@ public class WarpManifestSectionNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver.writeV3Array(manifest);
}); });
} }
@ -73,7 +73,7 @@ public class WarpManifestSectionNameEmptyTest {
WarpManifestX18 manifest = new WarpManifestX18(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.makeSection(PrimordialOctalOrangeString.valueOfEmpty()).withAttribute(foobar, foobar); manifest.makeSection(PrimordialOctalOrangeString.valueOfEmpty()).withAttribute(foobar, foobar);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver.writeV4Array(manifest);
}); });
} }
@ -82,7 +82,7 @@ public class WarpManifestSectionNameEmptyTest {
WarpManifestX8 manifest = new WarpManifestX8(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV5Array(manifest); WarpManifestorDriver.writeV5Array(manifest);
}); });
} }
} }

View file

@ -72,7 +72,7 @@ public class ZilLaLaFaultFilter extends HttpFilter {
res.setStatus(500); res.setStatus(500);
res.setContentType("text/plain"); res.setContentType("text/plain");
PrintWriter out = res.getWriter(); PrintWriter out = res.getWriter();
WarpManifestorDriver..writeV2StreamChar(report, out); WarpManifestorDriver.writeV2StreamChar(report, out);
out.flush(); out.flush();
// logger.warning(fault.toStringZilLaLa()); // logger.warning(fault.toStringZilLaLa());