Example #1
0
        public static TestClass BuildFrom(ClangWrapper clangWrapper, CXCursor classCursor)
        {
            var path        = clangWrapper.GetCursorFilePath(classCursor);
            var name        = clangWrapper.GetCursorName(classCursor);
            var line        = clangWrapper.GetCursorLine(classCursor);
            var testMethods = clangWrapper.RetrieveTestMethodsIn(classCursor);

            if (testMethods.Any())
            {
                return(new TestClass(path, name, line, new TestMethods(testMethods)));
            }

            return(new Class());
        }
Example #2
0
        public static TestMethod BuildFrom(ClangWrapper clangWrapper, CXCursor methodCursor)
        {
            var path           = clangWrapper.GetCursorFilePath(methodCursor);
            var name           = clangWrapper.GetCursorName(methodCursor);
            var line           = clangWrapper.GetCursorLine(methodCursor);
            var testProperties = clangWrapper.RetrieveTestPropertiesIn(methodCursor);

            if (testProperties.Any())
            {
                return(new TestMethod(path, name, line, new TestProperties(testProperties)));
            }

            return(new Method());
        }
Example #3
0
 public void retrieve_the_name_of_a_cursor()
 {
     ClangWrapper.GetCursorName(ClassCursor).Should().Be("ClangWrapperShould");
 }