Search in sources :

Example 11 with DependencyType

use of de.strullerbaumann.visualee.dependency.entity.DependencyType in project visualee by Thomas-S-B.

the class ExaminerResourceTest method testgetTypeFromToken.

@Test
public void testgetTypeFromToken() {
    String sourceLine;
    DependencyType actual;
    sourceLine = "My test sourcecode";
    actual = examiner.getTypeFromToken(sourceLine);
    assertEquals(null, actual);
    sourceLine = "@Resource";
    actual = examiner.getTypeFromToken(sourceLine);
    assertEquals(DependencyType.RESOURCE, actual);
    sourceLine = "@Resource(lookup = \"jdbc/ee-demos\")";
    actual = examiner.getTypeFromToken(sourceLine);
    assertEquals(DependencyType.RESOURCE, actual);
}
Also used : DependencyType(de.strullerbaumann.visualee.dependency.entity.DependencyType) Test(org.junit.Test)

Example 12 with DependencyType

use of de.strullerbaumann.visualee.dependency.entity.DependencyType in project visualee by Thomas-S-B.

the class DescriptionTest method testGetDescriptionPart.

/**
    * Test of getDescriptionPart method, of class Description.
    */
@Test
public void testGetDescriptionPart() {
    DependencyType type = DependencyType.EJB;
    String description = "My test desciption";
    String actual = Description.getDescriptionPart(type, description);
    assertTrue(actual.indexOf(Description.getDescriptionHeader(type)) > 0);
    assertTrue(actual.indexOf(description) > 0);
}
Also used : DependencyType(de.strullerbaumann.visualee.dependency.entity.DependencyType) Test(org.junit.Test)

Aggregations

DependencyType (de.strullerbaumann.visualee.dependency.entity.DependencyType)12 Test (org.junit.Test)9 Dependency (de.strullerbaumann.visualee.dependency.entity.Dependency)4 JavaSource (de.strullerbaumann.visualee.source.entity.JavaSource)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 JsonArrayBuilder (javax.json.JsonArrayBuilder)1 JsonObjectBuilder (javax.json.JsonObjectBuilder)1