public void TestSmoke_linear() { Allocation root = Allocation.NewRoot("root", 1); Allocation node1 = root.NewChild("node1", 2); Allocation node2 = node1.NewChild("node2", 3); Assert.AreEqual("node2", node2.GetDescription()); Assert.AreEqual(1.0 / 2 / 3, node2.GetFractionOfRoot(), DOUBLE_ERROR_MARGIN); Assert.IsTrue(node2.GetParent().IsPresent()); Assert.AreEqual(node1, node2.GetParent().Get()); Assert.AreEqual("node1", node1.GetDescription()); Assert.IsTrue(node1.GetParent().IsPresent()); Assert.AreEqual(root, node1.GetParent().Get()); Assert.AreEqual(1.0 / 2, node1.GetFractionOfRoot(), DOUBLE_ERROR_MARGIN); Assert.AreEqual("root", root.GetDescription()); Assert.AreEqual(1, root.GetAllocationUnits()); Assert.IsFalse(root.GetParent().IsPresent()); Assert.AreEqual(1.0, root.GetFractionOfRoot(), DOUBLE_ERROR_MARGIN); }
public override string ToString() { return($"ProgressEvent:{progressUnits}:{allocation.GetAllocationUnits()}:{allocation.GetDescription()}"); }
public override string ToString() { return($"{(progressUnits==allocation.GetAllocationUnits()?"End":"Start")}:{allocation.GetDescription()}"); }