GetTestPath() public method

public GetTestPath ( System.Test test ) : string
test System.Test
return string
Ejemplo n.º 1
0
        public void get_test_path()
        {
            var project = new Project(@"c:\a\b\c\d\project.proj")
            {
                TestFolder = "tests"
            };
            Hierarchy hierarchy = DataMother.BuildHierarchy(@"
            t1,Success
            s1/t2,Success
            s1/s2/t3,Success
            ");

            Test test = hierarchy.FindTest("t1");

            project.GetTestPath(test).ShouldEqual(@"c:\a\b\c\d\tests\t1.xml");
            project.GetTestPath(hierarchy.FindTest("s1/t2")).ShouldEqual(@"c:\a\b\c\d\tests\s1\t2.xml");
            project.GetTestPath(hierarchy.FindTest("s1/s2/t3")).ShouldEqual(@"c:\a\b\c\d\tests\s1\s2\t3.xml");
        }
Ejemplo n.º 2
0
        public void get_test_path_when_the_test_overrides_the_file_name()
        {
            var project = new Project(@"c:\a\b\c\d\project.proj")
            {
                TestFolder = "tests"
            };
            Hierarchy hierarchy = DataMother.BuildHierarchy(@"
            t1,Success
            s1/t2,Success
            s1/s2/t3,Success
            ");

            Test test = hierarchy.FindTest("t1");
            test.FileName = "TheBigTest.xml";

            project.GetTestPath(test).ShouldEqual(@"c:\a\b\c\d\tests\TheBigTest.xml");
        }
Ejemplo n.º 3
0
 public void get_the_test_path_of_a_test_at_the_hierarchy_scope()
 {
     var project = new Project(@"c:\a\b\c\d\project.proj")
     {
         TestFolder = "tests"
     };
     var hierarchy = new Hierarchy("something");
     var test = new Test("t0");
     hierarchy.AddTest(test);
     project.GetTestPath(test).ShouldEqual(@"c:\a\b\c\d\tests\t0.xml");
 }