Exemple #1
0
        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);
        }
Exemple #2
0
 public BaseRequestCircularChild(BaseRequestCircularParent parent)
 {
     Parent = parent;
     parent.Children.Add(this);
 }