feat(fls): import the e-mail programs into the editor model
The e-mail client and server of every host come into the model (core: EmailClientConfiguration, EmailServerConfiguration, EmailMessage), from Java's view: - the server's accounts are those of /mailserver/konten.txt, as Java reads them at every simulation start; without the file those of the bean list, which Java would drop; - the client's account is that of /konten.txt; without it the first of an older file's kontoListe, which FILIUS 2.14 no longer reads; - messages are numbered per program in folder order, as Swift does; the sent folder's are sent; a date is taken only when the file gives one. Departures from Swift: accounts and messages stay where Swift drops what fails its checks; first and last name stay apart; a port that is no number is the default, with a warning. On the corpus the model matches Swift's on all 13 files; the one Swift error is named (it numbers a mailbox's messages as their received time and writes that into the konten.txt it rewrites). The Swift dump now carries the e-mail state, and the file system comparison leaves out only Swift's hidden state files (and the directories it makes for them) instead of all of /mail, /mailserver and /peer2peer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -478,6 +478,27 @@ describe('readTopology rules', () => {
|
||||
expect(server.beanAccounts![0]!.messages[0]!.sender).toEqual({ name: 'Alice', mailAddress: 'alice@senior.de' });
|
||||
});
|
||||
|
||||
it("reads an older file's kontoListe, which FILIUS 2.14 ignores, in the order of its entries", () => {
|
||||
const legacyAccount = (username: string) =>
|
||||
`<void method="put"><string>${username}@senior.de</string><object class="filius.software.email.EmailKonto">
|
||||
<void property="benutzername"><string>${username}</string></void>
|
||||
<void property="pop3port"><string>110</string></void>
|
||||
</object></void>`;
|
||||
const { nodes } = topologyOf(`<object class="java.util.LinkedList">${nodeItem(`<object class="filius.hardware.knoten.Rechner">
|
||||
<void property="systemSoftware"><void property="installierteAnwendungen">
|
||||
<void method="put"><string>filius.software.email.EmailAnwendung</string><object class="filius.software.email.EmailAnwendung">
|
||||
<void property="kontoListe">${legacyAccount('rechner3')}${legacyAccount('rechner4')}</void>
|
||||
</object></void>
|
||||
</void></void></object>`)}</object>`);
|
||||
const client = nodes[0]!.system.applications![0]!;
|
||||
|
||||
expect(client.fileAccount).toBeNull();
|
||||
expect(client.legacyAccounts!.map((account) => [account.username, account.pop3Port])).toEqual([
|
||||
['rechner3', '110'],
|
||||
['rechner4', '110'],
|
||||
]);
|
||||
});
|
||||
|
||||
it("gives a modem Java's defaults and keeps an address the file sets to null", () => {
|
||||
const { nodes } = topologyOf(`<object class="java.util.LinkedList">
|
||||
${nodeItem('<object class="filius.hardware.knoten.Modem"/>')}
|
||||
|
||||
Reference in New Issue
Block a user