Search in sources :

Example 6 with ClassFileDescriptor

use of com.buschmais.jqassistant.plugin.java.api.model.ClassFileDescriptor in project jqa-java-plugin by buschmais.

the class ByteCodeVersionIT method javaVersion.

@Test
public void javaVersion() throws Exception {
    scanClasses(Pojo.class);
    assertThat(applyConcept("java:JavaVersion").getStatus(), CoreMatchers.equalTo(SUCCESS));
    store.beginTransaction();
    List<ClassFileDescriptor> types = query("MATCH (t:Type) WHERE t.name='Pojo' and t.javaVersion='Java 8' RETURN t").getColumn("t");
    assertThat(types.size(), equalTo(1));
    ClassFileDescriptor pojo = types.get(0);
    assertThat(pojo, typeDescriptor(Pojo.class));
    store.commitTransaction();
}
Also used : Pojo(com.buschmais.jqassistant.plugin.java.test.set.scanner.pojo.Pojo) ClassFileDescriptor(com.buschmais.jqassistant.plugin.java.api.model.ClassFileDescriptor) Test(org.junit.Test)

Aggregations

ClassFileDescriptor (com.buschmais.jqassistant.plugin.java.api.model.ClassFileDescriptor)6 Test (org.junit.Test)5 FileDescriptor (com.buschmais.jqassistant.plugin.common.api.model.FileDescriptor)3 JavaArtifactFileDescriptor (com.buschmais.jqassistant.plugin.java.api.model.JavaArtifactFileDescriptor)2 Pojo (com.buschmais.jqassistant.plugin.java.test.set.scanner.pojo.Pojo)2 Scanner (com.buschmais.jqassistant.core.scanner.api.Scanner)1 AbstractFileResource (com.buschmais.jqassistant.plugin.common.api.scanner.filesystem.AbstractFileResource)1 FileResource (com.buschmais.jqassistant.plugin.common.api.scanner.filesystem.FileResource)1 ClassVisitor (com.buschmais.jqassistant.plugin.java.impl.scanner.visitor.ClassVisitor)1 VisitorHelper (com.buschmais.jqassistant.plugin.java.impl.scanner.visitor.VisitorHelper)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 List (java.util.List)1 ClassReader (org.objectweb.asm.ClassReader)1