Commit 67e18e46 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Added 1 test

Showing with 31 additions and 0 deletions
+31 -0
......@@ -317,3 +317,34 @@ describe("cohérence des modes de paramètres : ", () => {
}
});
});
describe("Structure and calculated parameter(s) : ", () => {
it ("when all other params are linked, changing Structure should not lead to > 1 param. in CALC mode", () => {
const pc1 = new CloisonsParams(1.5, 102, 10, 1, 1, 0.5);
const c1 = new Cloisons(pc1);
c1.addChild(CreateStructure(LoiDebit.OrificeSubmerged, c1));
const pc2 = new CloisonsParams(1.5, 102, 10, 1, 1, 0.5);
const c2 = new Cloisons(pc2);
const c2s1 = CreateStructure(LoiDebit.OrificeSubmerged, c2);
c2.addChild(c2s1);
Session.getInstance().clear();
Session.getInstance().registerNub(c1);
Session.getInstance().registerNub(c2);
pc2.Q.defineReference(c1, "Q");
pc2.Z1.defineReference(c1, "Z1");
pc2.LB.defineReference(c1, "LB");
pc2.BB.defineReference(c1, "BB");
pc2.PB.defineReference(c1, "PB");
pc2.DH.defineReference(c1, "DH");
checkConsistency(c2);
const c2s2 = CreateStructure(LoiDebit.KIVI, c2);
c2.replaceChildInplace(c2s1, c2s2);
checkConsistency(c2);
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment