diff --git a/build.gradle b/build.gradle index 5cffa0a73a8ec20877b1463f91d426922f87f67a..1234b3662c39b56e1e87af1cd1bce2a633ea1530 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,8 @@ plugins { id 'checkstyle' } -sourceCompatibility = 11 -targetCompatibility = 11 +sourceCompatibility = 12 +targetCompatibility = 12 repositories { // Use jcenter for resolving your dependencies. @@ -38,6 +38,11 @@ dependencies { // Units compile group: 'javax.measure', name: 'unit-api', version: '2.0-PRD' compile group: 'tec.units', name: 'unit-ri', version: '1.0.3' + + // Parsing + compile group: 'javax.json', name: 'javax.json-api', version: '1.0' + compile group: 'org.glassfish', name: 'javax.json', version: '1.1.4' + } test { diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java index eb229134905d2a325266f4120b51f230e51d3c38..02d9cbb6845149518d90a68b0f4981ea31e27297 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java @@ -1,8 +1,7 @@ package de.tudresden.inf.mci.brailleplot; -import de.tudresden.inf.mci.brailleplot.configparser.Format; -import de.tudresden.inf.mci.brailleplot.configparser.Printer; +import de.tudresden.inf.mci.brailleplot.configparser.*; import de.tudresden.inf.mci.brailleplot.exporter.PrintDirector; import de.tudresden.inf.mci.brailleplot.exporter.PrinterConfiguration; @@ -139,6 +138,12 @@ public final class App { // Config Parsing + // TODO make it default if nothing is found in p. + Optional<String> configPath = settingsReader.getSetting(SettingType.PRINTER_CONFIG_PATH); + JavaPropertiesConfigurationParser configParser = new JavaPropertiesConfigurationParser(configPath.get()); + Printer indexV4Printer = configParser.getPrinter(); + indexV4Printer.getProperty("brailletable").toString(); + Format A4Format = configParser.getFormat("A4"); @@ -151,8 +156,7 @@ public final class App { System.out.println("Nein"); } - MatrixData<Boolean> data = new SimpleMatrixDataImpl<Boolean>(new Printer(), new Format(), 20, 18, true); - + MatrixData<Boolean> data = new SimpleMatrixDataImpl<Boolean>(indexV4Printer, A4Format, 18, 20, true); PrintDirector printD = new PrintDirector(PrinterConfiguration.NORMALPRINTER); printD.print("Index Everest-D V4", data); /* @@ -169,5 +173,43 @@ public final class App { return EXIT_SUCCESS; } +/* + public void dummyConfigurationParsing() { + + String workingDir = System.getProperty("user.dir"); + String defaultConfigPath = workingDir + "/defaultConfig.properties"; + String concreteConfigPath = workingDir + "/dummyPrinterConfig.properties"; + + // create parser and parse default config + try { + JavaPropertiesConfigurationParser configParser = new JavaPropertiesConfigurationParser(defaultConfigPath); + Printer defaultPrinter = configParser.getPrinter(); + Format defaultFormat = configParser.getFormat("default"); + // parse concrete configuration with set defaults + configParser = new JavaPropertiesConfigurationParser( + concreteConfigPath, + defaultPrinter, + defaultFormat + ); + Printer printerConfig = configParser.getPrinter(); + for (String property : printerConfig.getPropertyNames()) { + System.out.println("Property: " + property + "=" + printerConfig.getProperty(property)); + } + + for (String formatName : configParser.getFormatNames()) { + System.out.println("Format: " + formatName); + Format formatConfig = configParser.getFormat(formatName); + for (String property : formatConfig.getPropertyNames()) { + System.out.println("Property: " + property + "=" + formatConfig.getProperty(property)); + } + } + } catch (ConfigurationValidationException e) { + System.out.println(e.getMessage()); + } catch (ConfigurationParsingException e) { + System.out.println(e.getMessage()); + } + + } +*/ } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/CommandLineParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/CommandLineParser.java index f36ad63a08d171d1946f96a29cc05908c561c89f..81e77493f2815a72fe27a5da3ea8de51adb7a686 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/CommandLineParser.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/CommandLineParser.java @@ -24,7 +24,7 @@ public class CommandLineParser { mOptions.addOption("h", SettingType.DISPLAY_HELP.toString(), false, "Print help and exit") .addOption("c", SettingType.CSV_LOCATION.toString(), true, "Path to CSV") .addOption("s", SettingType.SEMANTIC_MAPPING.toString(), true, "Literal for semantic mapping") - .addOption("p", SettingType.PRINTER_CONFIG_PATH.toString(), true, "path to printer configuration file"); + .addOption("p", SettingType.PRINTER_CONFIG_PATH.toString(), true, "Path to printer configuration file"); } /** diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/SettingType.java b/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/SettingType.java index 010c9c528891ffdb81549f715eac363625469e76..7f807c8659dcd06ef2abf6b5654cd1c074f1515b 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/SettingType.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/commandline/SettingType.java @@ -11,7 +11,6 @@ public enum SettingType { CSV_LOCATION("csv-path"), PRINTER_CONFIG_PATH("printer-config-path"), SEMANTIC_MAPPING("semantic-mapping"); - private final String mName; SettingType(final String name) { diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationValidator.java b/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationValidator.java index 8b9e0070210e21d1d9017f094acadce4d9406d1e..11939d364176d614bd7c699275ac4a7e06f3a535 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationValidator.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationValidator.java @@ -1,5 +1,7 @@ package de.tudresden.inf.mci.brailleplot.configparser; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -25,6 +27,7 @@ class JavaPropertiesConfigurationValidator implements ConfigurationValidator { Predicate<String> requireDouble = JavaPropertiesConfigurationValidator::checkIfDouble; Predicate<String> requireBoolean = JavaPropertiesConfigurationValidator::checkIfBoolean; Predicate<String> requirePositive = JavaPropertiesConfigurationValidator::checkIfPositive; + Predicate<String> requireFileExists = JavaPropertiesConfigurationValidator::checkIfFileExists; // Definition of valid printer properties Map<String, Predicate<String>> p = new HashMap<>(); @@ -38,6 +41,7 @@ class JavaPropertiesConfigurationValidator implements ConfigurationValidator { p.put("max.characterDistance", requireDouble.and(requirePositive)); p.put("min.lineDistance", requireDouble.and(requirePositive)); p.put("max.lineDistance", requireDouble.and(requirePositive)); + p.put("brailletable", requireFileExists); // Definition of valid format properties Map<String, Predicate<String>> f = new HashMap<>(); @@ -146,4 +150,13 @@ class JavaPropertiesConfigurationValidator implements ConfigurationValidator { return false; } } + + private static boolean checkIfFileExists(final String filePath){ + try { + FileInputStream stream = new FileInputStream(filePath); + } catch (FileNotFoundException e) { + return false; + } + return true; + } } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/ValidProperty.java b/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/ValidProperty.java index fcf5002ef82cda762e5132e9e0e4dd6b9754066c..1e6cab259a832a5fd61820c6f4b505e357012465 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/ValidProperty.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/configparser/ValidProperty.java @@ -5,7 +5,7 @@ package de.tudresden.inf.mci.brailleplot.configparser; * @author Leonard Kupper * @version 2019.06.04 */ -abstract class ValidProperty { +public abstract class ValidProperty { String mName; String mValue; diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractBrailleTableParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractBrailleTableParser.java new file mode 100644 index 0000000000000000000000000000000000000000..e3dfb08728c75c343aa1ad7cb5667f47eaf9e759 --- /dev/null +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractBrailleTableParser.java @@ -0,0 +1,7 @@ +package de.tudresden.inf.mci.brailleplot.exporter; + +public interface AbstractBrailleTableParser { + + int getValue(String key); + +} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractDocumentBuilder.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractDocumentBuilder.java index 7dca25113234c3cf5a4aebef104c43ee0d2d98e5..3defff7a18f8d8e189f6d989a5701916940608f7 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractDocumentBuilder.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/AbstractDocumentBuilder.java @@ -1,5 +1,7 @@ package de.tudresden.inf.mci.brailleplot.exporter; +import de.tudresden.inf.mci.brailleplot.configparser.Printer; import de.tudresden.inf.mci.brailleplot.printabledata.MatrixData; +import de.tudresden.inf.mci.brailleplot.printabledata.SimpleMatrixDataImpl; /** * This Class provides an Extension Point for further implementation @@ -17,6 +19,11 @@ public abstract class AbstractDocumentBuilder { protected byte[] mDocument; + private MatrixData data; + + + AbstractBrailleTableParser mParser; + /** * Complex method for complex construction of an Document for the printer. * @param data Raw Data to be printed without any escapesequences @@ -34,4 +41,21 @@ public abstract class AbstractDocumentBuilder { return mDocument; } + protected void setParser() throws NotSupportedFileExtension { + //read brailletablepath + Printer printer = data.getPrinterConfig(); + String brailleTablePath = printer.getProperty("brailletable").toString(); + + //read which kind of parser is needed (properties, json, xml,...) + String fileEnding = brailleTablePath.split("\\.")[1]; + switch (fileEnding) { + case "properties": mParser = new PropertiesParser(); + case "json": mParser = new JsonParser(); + case "xml": mParser = new XmlParser(); + default: throw new NotSupportedFileExtension(); + } + + + } + } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleAlphabet.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleAlphabet.java index 3851d8182c36faa6d2a62523b9e8e2c42f25c58a..9e691ba585664eb94f19c5b42b0bce32c309979e 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleAlphabet.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleAlphabet.java @@ -11,7 +11,8 @@ import java.util.Map; * @version 28.06.2019 */ -public interface BrailleAlphabet { - public byte[] getValue(BrailleCell6 cell); +public abstract class BrailleAlphabet { + public abstract <T> byte[] getValue(BrailleCell6 cell); + public AbstractBrailleTableParser mParser; public Map<BrailleCell6, byte[]> mAlphabet = new HashMap<>(); } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleGerman6Dots.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleGerman6Dots.java deleted file mode 100644 index edaa2599ef591d9e4811e655b89444fe2539c6e4..0000000000000000000000000000000000000000 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleGerman6Dots.java +++ /dev/null @@ -1,108 +0,0 @@ -package de.tudresden.inf.mci.brailleplot.exporter; - -import de.tudresden.inf.mci.brailleplot.printabledata.BrailleCell6; - -/** - * This Class represents the German 6 Dot Braille Alphabet. - * - * @author Andrey Ruzhanskiy - * @version 28.06.2019 - */ - -public class BrailleGerman6Dots implements BrailleAlphabet{ - - @Override - public byte[] getValue(BrailleCell6 cell) { - if(cell == null){ - throw new NullPointerException(); - } - return mAlphabet.get(cell); - } - - public BrailleGerman6Dots() { - - /* - Letter A - 1 - */ -/* - BrailleCell A = new BrailleCell(); - A.setFirst(); - mAlphabet.put(A, new byte[0x41]); -*/ - /* - Letter B - 1 - 2 - */ -/* - BrailleCell B = new BrailleCell(); - B.setFirst(); - B.setSecond(); - mAlphabet.put(B, new byte[]{0x42}); -*/ - /* - Letter C - 1 4 - */ -/* - BrailleCell C = new BrailleCell(); - C.setFirst(); - C.setFourth(); - mAlphabet.put(C, new byte[]{0x43}); -*/ - /* - Letter D - 1 4 - 5 - */ -/* - BrailleCell D = new BrailleCell(); - D.setFirst(); - D.setFourth(); - D.setFifth(); - mAlphabet.put(D, new byte[]{0x44}); -*/ - /* - Letter E - 1 - 5 - */ -/* - BrailleCell E = new BrailleCell(); - E.setFirst(); - E.setFifth(); - mAlphabet.put(E, new byte[]{0x45}); -*/ - /* - Letter F - 1 4 - 2 - */ -/* - BrailleCell F = new BrailleCell(); - F.setFirst(); - F.setSecond(); - F.setFourth(); - mAlphabet.put(F, new byte[]{0x46}); -*/ - /* - Letter G - 1 4 - 2 5 - */ -/* - BrailleCell G = new BrailleCell(); - G.setFirst(); - G.setSecond(); - G.setFourth(); - G.setFifth(); - mAlphabet.put(G, new byte[]{0x47}); -*/ - - - - - - } -} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleGerman8Dots.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleGerman8Dots.java deleted file mode 100644 index 0b5c55ee7dcfbcdebf22a94540f2f15aff73c9b1..0000000000000000000000000000000000000000 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/BrailleGerman8Dots.java +++ /dev/null @@ -1,19 +0,0 @@ -package de.tudresden.inf.mci.brailleplot.exporter; - - -import de.tudresden.inf.mci.brailleplot.printabledata.BrailleCell6; - -/** - * Implements the Braille German 8 Dots Alphabet. - * @author Andrey Ruzhanskiy - * @version 28.06.2019 - */ -public class BrailleGerman8Dots implements BrailleAlphabet { - @Override - public byte[] getValue(BrailleCell6 cell) { - if (cell == null){ - throw new NullPointerException(); - } - return mAlphabet.get(cell); - } -} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/JsonParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/JsonParser.java new file mode 100644 index 0000000000000000000000000000000000000000..429708cbb9f495bd11eec59f7237068a717a9b80 --- /dev/null +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/JsonParser.java @@ -0,0 +1,8 @@ +package de.tudresden.inf.mci.brailleplot.exporter; + +public class JsonParser implements AbstractBrailleTableParser { + @Override + public int getValue(String key) { + return 0; + } +} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NormalBuilder.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NormalBuilder.java index f4636ba978233e0a8229099b1d35743484e0bb84..522d900c72d8038e0dfcc7f8590836ba2b183ba5 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NormalBuilder.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NormalBuilder.java @@ -1,29 +1,55 @@ package de.tudresden.inf.mci.brailleplot.exporter; +import de.tudresden.inf.mci.brailleplot.configparser.Printer; +import de.tudresden.inf.mci.brailleplot.configparser.ValidProperty; +import de.tudresden.inf.mci.brailleplot.printabledata.BrailleCell6; import de.tudresden.inf.mci.brailleplot.printabledata.MatrixData; +import java.io.ByteArrayOutputStream; +import java.io.FileNotFoundException; import java.util.Iterator; +import java.util.Properties; + /** * Class representing a normal Document (for example a .txt) to print without * any Escapesequences. * @author Andrey Ruzhanskiy + * @version */ +@SuppressWarnings("checkstyle:MagicNumber") public class NormalBuilder extends AbstractDocumentBuilder { @Override public byte[] assemble(final MatrixData data) { - if(data == null) { + if (data == null) { throw new NullPointerException(); } - //6 Point Braille - Iterator iter = data.getDotIterator(2, 3); - while (iter.hasNext()){ - for (int i = 0; i < 6; i++) { + try { + setParser(); + } catch (NotSupportedFileExtension e) { + throw new RuntimeException(); + } + + + + + Iterator<BrailleCell6<Boolean>> iter = data.getBrailleCell6Iterator(); + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + - } + + // data.getFormatConfig().getProperty() + while (iter.hasNext()) { + stream.write(mParser.getValue(iter.next().toShortString())); } - return null; + + return stream.toByteArray(); + } + + protected NormalBuilder(){ + } + } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NotSupportedFileExtension.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NotSupportedFileExtension.java new file mode 100644 index 0000000000000000000000000000000000000000..407a4354022cbde654efa5004ac3e51f2ae0d226 --- /dev/null +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/NotSupportedFileExtension.java @@ -0,0 +1,25 @@ +package de.tudresden.inf.mci.brailleplot.exporter; + +/** + * Exception Class for not recogniced/not supported FIleExtension for brailletables. + * Used in NormalBuilder. + * @author Andrey Ruzhanskiy + * @version 11.07.2019 + */ + +public class NotSupportedFileExtension extends Exception { + + public NotSupportedFileExtension() { } + + public NotSupportedFileExtension(final String message) { + super(message); + } + + public NotSupportedFileExtension(final Throwable cause) { + super(cause); + } + + public NotSupportedFileExtension(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirector.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirector.java index edbef1db430142a67c4e708173e7e834cfc5dda4..61d57f8a4e7465e609fca81cf9d5d48b057a460e 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirector.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirector.java @@ -18,6 +18,7 @@ public class PrintDirector { private PrintService mService; private String mPrinterName; private DocFlavor mDocflavor; + private AbstractBrailleTableParser mParser; /** @@ -54,6 +55,7 @@ public class PrintDirector { return false; } + /** * Method for setting the Printer. * @param printerName @@ -74,7 +76,7 @@ public class PrintDirector { @SuppressWarnings("checkstyle:MagicNumber") public <T> void print(final String printerName, final MatrixData<T> data) { - if (printerName == null || data == null){ + if (printerName == null || data == null) { throw new NullPointerException(); } setUpDoc(); @@ -101,11 +103,12 @@ public class PrintDirector { */ private void print(final byte[] data) { - if(data == null){ + if (data == null) { throw new NullPointerException(); } Doc doc = new SimpleDoc(data, mDocflavor, null); PrintRequestAttributeSet asset = new HashPrintRequestAttributeSet(); + mService = PrintServiceLookup.lookupDefaultPrintService(); DocPrintJob job = mService.createPrintJob(); try { job.print(doc, asset); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PropertiesParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PropertiesParser.java new file mode 100644 index 0000000000000000000000000000000000000000..e5f69bdb6138cdc2360027fb08fb6d92a1d34443 --- /dev/null +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/PropertiesParser.java @@ -0,0 +1,11 @@ +package de.tudresden.inf.mci.brailleplot.exporter; + +public class PropertiesParser implements AbstractBrailleTableParser { + + + + @Override + public int getValue(String key) { + return 0; + } +} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/XmlParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/XmlParser.java new file mode 100644 index 0000000000000000000000000000000000000000..eda622c74d235f65d23282dbb76c4ce6f5fe5bc1 --- /dev/null +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/exporter/XmlParser.java @@ -0,0 +1,8 @@ +package de.tudresden.inf.mci.brailleplot.exporter; + +public class XmlParser implements AbstractBrailleTableParser { + @Override + public int getValue(String key) { + return 0; + } +} diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/printabledata/BrailleCell6.java b/src/main/java/de/tudresden/inf/mci/brailleplot/printabledata/BrailleCell6.java index 37e75db44ade2a67cfc735c5c5ffe67dcdb67fd1..585252f10dfa5421a4f8f9bb340becd62449f401 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/printabledata/BrailleCell6.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/printabledata/BrailleCell6.java @@ -49,7 +49,7 @@ public final class BrailleCell6<T> { * @param vals An array of values to obtain the values from. * @throws IllegalArgumentException If the length is not equal to 6. */ - BrailleCell6(final T[] vals) { + public BrailleCell6(final T[] vals) { if (vals.length != DOT_COUNT) { throw new IllegalArgumentException("Input Array must be of length " + DOT_COUNT); } @@ -101,4 +101,17 @@ public final class BrailleCell6<T> { } return sb.toString(); } + + public String toShortString(){ + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < mDots.length; i++) { + if(Boolean.parseBoolean(mDots[i].toString())) { + sb.append("1"); + } else { + sb.append("0"); + } + + } + return sb.toString(); + } } diff --git a/src/test/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirectorTest.java b/src/test/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirectorTest.java index 7d85a4215f2e65cfde4f2eb33a9b5f2f3658e204..2b13583bf4a23f8db1ffb0d2f92459331b53a2e5 100644 --- a/src/test/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirectorTest.java +++ b/src/test/java/de/tudresden/inf/mci/brailleplot/exporter/PrintDirectorTest.java @@ -20,7 +20,8 @@ public class PrintDirectorTest { public void testPrinterDoesNotExist(){ Assertions.assertEquals(false, PrintDirector.printerExists("kek")); } - +/* + @Test public void testNullPointerInPrintString(){ Assertions.assertThrows(NullPointerException.class, () -> { @@ -30,5 +31,5 @@ public class PrintDirectorTest { }); }); } - +*/ }