This commit is contained in:
parent
1375020388
commit
8cfc21bc3c
|
@ -18,7 +18,7 @@ public class Msq {
|
|||
|
||||
public List<Page> page = new ArrayList<>();
|
||||
|
||||
private final VersionInfo versionInfo;
|
||||
public final VersionInfo versionInfo;
|
||||
|
||||
public Msq() {
|
||||
versionInfo = new VersionInfo("rusEFI+2020");
|
||||
|
@ -36,7 +36,7 @@ public class Msq {
|
|||
@NotNull
|
||||
public static Msq create(int totalConfigSize, String tsSignature) {
|
||||
Msq tune = new Msq();
|
||||
tune.versionInfo.setTsSignature(tsSignature);
|
||||
tune.versionInfo.setSignature(tsSignature);
|
||||
tune.page.add(new Page(null, null));
|
||||
tune.page.add(new Page(0, totalConfigSize));
|
||||
return tune;
|
||||
|
@ -84,7 +84,6 @@ public class Msq {
|
|||
return new Bibliography();
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public VersionInfo getVersionInfo() {
|
||||
return versionInfo;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
|
||||
public class VersionInfo {
|
||||
private String firmwareInfo;
|
||||
private String tsSignature;
|
||||
private String signature;
|
||||
|
||||
public VersionInfo() {
|
||||
}
|
||||
|
@ -30,14 +30,14 @@ public class VersionInfo {
|
|||
|
||||
@XmlAttribute
|
||||
public String getSignature() {
|
||||
return tsSignature;
|
||||
return signature;
|
||||
}
|
||||
|
||||
public void setFirmwareInfo(String firmwareInfo) {
|
||||
this.firmwareInfo = firmwareInfo;
|
||||
}
|
||||
|
||||
public void setTsSignature(String tsSignature) {
|
||||
this.tsSignature = tsSignature;
|
||||
public void setSignature(String signature) {
|
||||
this.signature = signature;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
/**
|
||||
* from IDEA this unit test needs to be executed with "empty" working directory
|
||||
|
@ -32,6 +33,7 @@ public class TuneReadWriteTest {
|
|||
public void testCompareBinaryToTSTune() throws Exception {
|
||||
Msq tsTune = Msq.readTune(PATH + "CurrentTune.msq");
|
||||
System.out.println(tsTune);
|
||||
assertNotNull("signature", tsTune.getVersionInfo().getSignature());
|
||||
|
||||
ConfigurationImage tsBinaryData = tsTune.asImage(IniFileModel.getInstance(), Fields.TOTAL_CONFIG_SIZE);
|
||||
|
||||
|
@ -55,6 +57,7 @@ public class TuneReadWriteTest {
|
|||
|
||||
// and now reading that XML back
|
||||
Msq tuneFromFile = Msq.readTune(fileName);
|
||||
assertNotNull(tuneFromFile.getVersionInfo().getSignature());
|
||||
|
||||
ConfigurationImage binaryDataFromXml = tuneFromFile.asImage(IniFileModel.getInstance(), Fields.TOTAL_CONFIG_SIZE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue