package language.java.token;

import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import prosecutor.barrister.languages.Tokens;
import prosecutor.barrister.languages.java_default.JavaParser;

import java.io.File;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by Fry on 01.07.2016.
 */
public class TokenConvertTest {

    @BeforeClass
    public void setTokensID()
    {
        Tokens.generateIndex();
    }
    @AfterClass
    public void resetTokensID()
    {
        Tokens.resetIndexs();
    }

    @Test
    public void testTokenConvert()
    {
        JavaParser parser=new JavaParser();
        File file=new File("src/test/resources/language/java/tokenTesting/source.java");
        Set<Path> paths=new HashSet<>();
        paths.add(file.toPath()); 
        SubmissionTokens tokens=parser.parseTokens(paths);
        tokens.sort();

    }
}

@@ -252,16 +252,78 @@
 aParser;
+%0Aimport prosecutor.barrister.submissions.tokens.TokensMapping;
 %0A%0Aimport
@@ -941,24 +941,21 @@
     
-SubmissionTokens
+TokensMapping
  tok
@@ -988,31 +988,8 @@
 hs);
-%0A        tokens.sort();
 %0A%0A  

Test ref update