public void SyncCorrelationId_CircularReferences() { // ARRANGE var root = new BaseRequestCircularParent(); // ACT root.SyncCorrelationIds(); // ASSERT Assert.AreEqual(root.CorrelationId, root.Children.Skip(0).First().CorrelationId); Assert.AreEqual(root.CorrelationId, root.Children.Skip(1).First().CorrelationId); Assert.AreEqual(root.CorrelationId, root.Children.Skip(0).First().Parent.CorrelationId); Assert.AreEqual(root.CorrelationId, root.Children.Skip(1).First().Parent.CorrelationId); }
public BaseRequestCircularChild(BaseRequestCircularParent parent) { Parent = parent; parent.Children.Add(this); }