コード例 #1
0
 @Test
 public void testSingleImage() {
   ImageFinderFunction f = new ImageFinderFunction("foo");
   ASTVariableDeclaratorId node = new ASTVariableDeclaratorId(1);
   node.setImage("foo");
   NameDeclaration decl = new VariableNameDeclaration(node);
   f.applyTo(decl);
   assertEquals(decl, f.getDecl());
 }
コード例 #2
0
 @Test
 public void testSeveralImages() {
   List<String> imgs = new ArrayList<String>();
   imgs.add("Foo.foo");
   imgs.add("foo");
   ImageFinderFunction f = new ImageFinderFunction(imgs);
   ASTVariableDeclaratorId node = new ASTVariableDeclaratorId(1);
   node.setImage("foo");
   NameDeclaration decl = new VariableNameDeclaration(node);
   f.applyTo(decl);
   assertEquals(decl, f.getDecl());
 }