Esempio n. 1
0
        public void get_path_with_hierarchy_at_top()
        {
            var hierarchy = new Hierarchy("hier");
            hierarchy.AddTest("s1/s2/s3/t1");

            hierarchy.FindSuite("s1/s2/s3").GetPath().Locator.ShouldEqual("s1/s2/s3");
            hierarchy.FindSuite("s1/s2").GetPath().Locator.ShouldEqual("s1/s2");
            hierarchy.FindSuite("s1").GetPath().Locator.ShouldEqual("s1");
        }
Esempio n. 2
0
        public void get_project_name()
        {
            var hierarchy = new Hierarchy("hier");
            hierarchy.AddTest("s1/s2/s3/t1");

            Suite suite = hierarchy.FindSuite("s1/s2/s3");
            suite.GetProjectName().ShouldEqual(hierarchy.Name);
        }
        public static void SuiteWasVisited(this IHierarchyVisitor visitor, Hierarchy hierarchy, string path)
        {
            Suite suite = hierarchy.FindSuite(path);
            suite.ShouldNotBeNull();

            visitor.AssertWasCalled(x => x.StartSuite(suite));
            visitor.AssertWasCalled(x => x.EndSuite(suite));
        }