View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.cpd;
5   
6   import static org.junit.Assert.assertTrue;
7   
8   import org.junit.Test;
9   public class LanguageFactoryTest {
10  
11      @Test
12      public void testSimple() {
13          LanguageFactory f = new LanguageFactory();
14          assertTrue(f.createLanguage("java") instanceof JavaLanguage);
15          assertTrue(f.createLanguage("cpp") instanceof CPPLanguage);
16          assertTrue(f.createLanguage("c") instanceof CPPLanguage);
17          assertTrue(f.createLanguage("php") instanceof PHPLanguage);
18          assertTrue(f.createLanguage("ruby") instanceof RubyLanguage);
19          assertTrue(f.createLanguage("plsql") instanceof PLSQLLanguage);
20      }
21  
22      public static junit.framework.Test suite() {
23          return new junit.framework.JUnit4TestAdapter(LanguageFactoryTest.class);
24      }
25  }