View Javadoc

    1   package net.sourceforge.pmd.cpd;
    2
    3   import static org.junit.Assert.assertEquals;
    4   import net.sourceforge.pmd.cpd.TokenEntry;
    5
    6   import org.junit.Test;
    7
    8   public class TokenEntryTest  {
    9
    10      @Test
    11      public void testSimple() {
    12          TokenEntry.clearImages();
    13          TokenEntry mark = new TokenEntry("public", "/var/Foo.java", 1);
    14          assertEquals(1, mark.getBeginLine());
    15          assertEquals("/var/Foo.java", mark.getTokenSrcID());
    16          assertEquals(0, mark.getIndex());
    17      }
    18
    19      public static junit.framework.Test suite() {
    20          return new junit.framework.JUnit4TestAdapter(TokenEntryTest.class);
    21      }
    22  }