public void CreatesValidId()
        {
            WithDiscovery(() =>
            {
                var context               = new MspecContextTestElement(new ClrTypeName("Namespace.Context"), null, null);
                var specification         = new MspecSpecificationTestElement(context, "behaves_like", "Namespace.ABehavior", null, null);
                var behaviorSpecification = new MspecBehaviorSpecificationTestElement(specification, "should", null);

                Assert.AreEqual("Namespace.Context.behaves_like.should", behaviorSpecification.NaturalId.TestId);
            });
        }
        public void UnreportedParentsAreAddedToSet()
        {
            WithDiscovery(() =>
            {
                var context       = new MspecContextTestElement(new ClrTypeName("Namespace.Context"), null, null);
                var behavior      = new MspecSpecificationTestElement(context, "behaves_like", "Namespace.ABehavior", null, null);
                var specification = new MspecBehaviorSpecificationTestElement(behavior, "should", null);

                var elements = new HashSet <IUnitTestElement>
                {
                    context,
                    specification
                };

                var rule = new EnsureAncestorsAddedToExecutedElementsRule();

                rule.Apply(elements, null !, null !);

                CollectionAssert.Contains(elements, behavior);
            });
        }