Package com.dubture.doctrine.annotation.model

Examples of com.dubture.doctrine.annotation.model.Annotation


        List<Annotation> annotations = getCommentAnnotations(comment, true);

        assertEquals(1, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("", annotation.getNamespace());
        assertEquals("Route", annotation.getClassName());
    }
View Full Code Here


        List<Annotation> annotations = getCommentAnnotations(comment, 1568);

        assertEquals(2, annotations.size());

        Annotation annotation = annotations.get(1);
        assertEquals("", annotation.getNamespace());
        assertEquals("Template", annotation.getClassName());
    }
View Full Code Here

        List<Annotation> annotations = parser.parse(comment, 1568);

        assertEquals(2, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("", annotation.getNamespace());
        assertEquals("Route", annotation.getClassName());
    }
View Full Code Here

        List<Annotation> annotations = getCommentAnnotations(comment, true);

        assertEquals(1, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("A\\", annotation.getNamespace());
        assertEquals("B", annotation.getClassName());
        assertEquals(1, annotation.getSourcePosition().line);
        assertEquals(5, annotation.getSourcePosition().column);
        assertEquals(4, annotation.getSourcePosition().startOffset);
        assertEquals(7, annotation.getSourcePosition().endOffset);
    }
View Full Code Here

        List<Annotation> annotations = getCommentAnnotations(comment);

        assertEquals(1, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("Route", annotation.getClassName());
        assertEquals("/path", annotation.getArguments().get(0).toString());
    }
View Full Code Here

                        "*/";

        List<Annotation> annotations = getCommentAnnotations(comment);

        assertEquals(1, annotations.size());
        Annotation annotation = annotations.get(0);
        assertEquals(2, annotation.getSourcePosition().line);
        assertEquals(4, annotation.getSourcePosition().column);
        assertEquals(8, annotation.getSourcePosition().startOffset);
        assertEquals(22, annotation.getSourcePosition().endOffset);
    }
View Full Code Here

        List<Annotation> annotations = getCommentAnnotations(comment);

        assertEquals(1, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("Route", annotation.getClassName());
        assertEquals("/path", annotation.getArguments().get(0).toString());
    }
View Full Code Here

        List<Annotation> annotations = getCommentAnnotations(comment);

        assertEquals(3, annotations.size());

        Annotation annotation = annotations.get(2);
        assertEquals("Extra\\", annotation.getNamespace());
        assertEquals("Secure", annotation.getClassName());
        assertEquals("secured_route", annotation.getArguments().get(0).toString());
        assertEquals(true, annotation.getArgumentValue("name").getValue());
        assertEquals(null, annotation.getArgumentValue("other").getValue());
        assertEquals(7, annotation.getSourcePosition().line);
        assertEquals(14, annotation.getSourcePosition().column);
        assertEquals(219, annotation.getSourcePosition().startOffset);
        assertEquals(275, annotation.getSourcePosition().endOffset);
    }
View Full Code Here

        int commentOffset = 17;
        List<Annotation> annotations = getCommentAnnotations(comment, commentOffset);

        assertEquals(1, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("Orm\\", annotation.getNamespace());
        assertEquals("JoinTable", annotation.getClassName());
        assertEquals("literal", annotation.getArguments().get(0).toString());
        assertEquals("join_table_name", annotation.getArgumentValue("name").getValue());
        assertEquals(2, annotation.getSourcePosition().line);
        assertEquals(12, annotation.getSourcePosition().column);
        assertEquals(16 + commentOffset, annotation.getSourcePosition().startOffset);
        assertEquals(252 + commentOffset, annotation.getSourcePosition().endOffset);
    }
View Full Code Here

TOP

Related Classes of com.dubture.doctrine.annotation.model.Annotation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.