This commit is contained in:
parent
3721232759
commit
3946e16bf1
|
@ -53,7 +53,7 @@ public class EnumIniField extends IniField {
|
|||
|
||||
if (ordinal >= enums.size())
|
||||
throw new IllegalStateException(ordinal + " in " + getName());
|
||||
return enums.get(ordinal);
|
||||
return "\"" + enums.get(ordinal) + "\"";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
|
|
@ -14,8 +14,7 @@ import org.junit.Test;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* from IDEA this unit test needs to be executed with "empty" working directory
|
||||
|
@ -68,6 +67,19 @@ public class TuneReadWriteTest {
|
|||
assertNotNull(flow);
|
||||
assertEquals("2", flow.getDigits());
|
||||
|
||||
Constant nonEmptyFormula = tuneFromBinary.findPage().findParameter("fsioFormulas1");
|
||||
assertNotNull(nonEmptyFormula);;
|
||||
|
||||
/**
|
||||
* Empty strings values should be omitted from the tune
|
||||
*/
|
||||
Constant emptyFormula = tuneFromBinary.findPage().findParameter("fsioFormulas2");
|
||||
assertNull(emptyFormula);;
|
||||
|
||||
Constant enumField = tuneFromBinary.findPage().findParameter("acRelayPin");
|
||||
// quotes are expected
|
||||
assertEquals("\"NONE\"", enumField.getValue());
|
||||
|
||||
// and now reading that XML back
|
||||
Msq tuneFromFile = Msq.readTune(fileName);
|
||||
assertNotNull(tuneFromFile.getVersionInfo().getSignature());
|
||||
|
|
Loading…
Reference in New Issue