public void GetStochastNamesRecursively_IllustrationPointNodeWithFaultTreeIllustrationPointAndChildrenContainingStochasts_ReturnStochastNames()
        {
            // Setup
            const string stochastNameA         = "Stochast A";
            const string stochastNameB         = "Stochast B";
            var          illustrationPointNode = new IllustrationPointNode(new TestFaultTreeIllustrationPoint(new[]
            {
                new Stochast(stochastNameA, 2, 4),
                new Stochast(stochastNameB, 1, 5)
            }));

            illustrationPointNode.SetChildren(new[]
            {
                new IllustrationPointNode(new FaultTreeIllustrationPoint("Point A", 0.0, new[]
                {
                    new Stochast(stochastNameA, 2, 3)
                }, CombinationType.And)),
                new IllustrationPointNode(new FaultTreeIllustrationPoint("Point B", 0.0, new[]
                {
                    new Stochast(stochastNameB, 2, 3)
                }, CombinationType.And))
            });

            // Call
            IEnumerable <string> names = illustrationPointNode.GetStochastNamesRecursively();

            // Assert
            CollectionAssert.AreEqual(new[]
            {
                stochastNameA,
                stochastNameB,
                stochastNameA,
                stochastNameB
            }, names);
        }
        public void GetStochastNamesRecursively_IllustrationPointNodeWithSubMechanismIllustrationPointAndNoChildren_ReturnStochastNames()
        {
            // Setup
            const string stochastNameA         = "Stochast A";
            const string stochastNameB         = "Stochast B";
            var          illustrationPointNode = new IllustrationPointNode(new TestSubMechanismIllustrationPoint(new[]
            {
                new SubMechanismIllustrationPointStochast(stochastNameA, "-", 2, 4, 2),
                new SubMechanismIllustrationPointStochast(stochastNameB, "-", 1, 5, 4)
            }));

            // Call
            IEnumerable <string> names = illustrationPointNode.GetStochastNamesRecursively();

            // Assert
            CollectionAssert.AreEqual(new[]
            {
                stochastNameA,
                stochastNameB
            }, names);
        }