Akka.Cluster.Tests.ReachabilitySpec.ReachabilityTable_must_be_pruned_when_all_records_of_an_observer_are_reachable C# (CSharp) Method

ReachabilityTable_must_be_pruned_when_all_records_of_an_observer_are_reachable() private method

        public void ReachabilityTable_must_be_pruned_when_all_records_of_an_observer_are_reachable()
        {
            var r = Reachability.Empty.
                Unreachable(nodeB, nodeA).Unreachable(nodeB, nodeC).
                Unreachable(nodeD, nodeC).
                Reachable(nodeB, nodeA).Reachable(nodeB, nodeC);
            Assert.True(r.IsReachable(nodeA));
            Assert.False(r.IsReachable(nodeC));
            var expected1 = ImmutableList.Create(new Reachability.Record(
                nodeD,
                nodeC,
                Reachability.ReachabilityStatus.Unreachable,
                1));
            Assert.Equal(expected1, r.Records);

            var r2 = r.Unreachable(nodeB, nodeD).Unreachable(nodeB, nodeE);
            var expected2 = ImmutableHashSet.Create(
                new Reachability.Record(nodeD, nodeC, Reachability.ReachabilityStatus.Unreachable, 1),
                new Reachability.Record(nodeB, nodeD, Reachability.ReachabilityStatus.Unreachable, 5),
                new Reachability.Record(nodeB, nodeE, Reachability.ReachabilityStatus.Unreachable, 6)
                );
            Assert.Equal(expected2, r2.Records.ToImmutableHashSet());
        }