public void Add(IPatch patch) { PatchContainer pc = new PatchContainer(patch); mapping.Add(patch, pc); rootSet.Add(pc); }
public void PatchDetectOutletValueChangeDuringExecution() { ChangeOutlet patch = new ChangeOutlet(); PatchContainer pc = new PatchContainer(patch); Assert.IsFalse(patch.output.HasChanged, "#1"); pc.ExecutePatch(); Assert.IsTrue(patch.output.HasChanged, "#2"); }
public void Connect(IPatch from, string outlet, IPatch to, string inlet) { PatchContainer fromCont = mapping [from]; PatchContainer toCont = mapping [to]; rootSet.Remove(toCont); fromCont.GetOutlet(outlet).ConnectTo(toCont.GetInlet(inlet)); }
public void PatchDetectInletValueChangeBetweenExecutions() { CheckInletChanged patch = new CheckInletChanged(); PatchContainer pc = new PatchContainer(patch); Assert.IsFalse(patch.hasChanged, "#1"); pc.ExecutePatch(); Assert.IsFalse(patch.hasChanged, "#2"); patch.input.Value = 20; pc.ExecutePatch(); Assert.IsTrue(patch.hasChanged, "#3"); pc.ExecutePatch(); Assert.IsFalse(patch.hasChanged, "#4"); }