ClasspathGroovyLoaderTest.java :  » HTTP » tamacat » org » tamacat » groovy » Java Open Source

Java Open Source » HTTP » tamacat 
tamacat » org » tamacat » groovy » ClasspathGroovyLoaderTest.java
/*
 * Copyright (c) 2010, TamaCat.org
 * All rights reserved.
 */
package org.tamacat.groovy;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class ClasspathGroovyLoaderTest {

  ClasspathGroovyLoader loader;
  
  @Before
  public void setUp() throws Exception {
    loader = new ClasspathGroovyLoader();
  }

  @After
  public void tearDown() throws Exception {
  }

  @Test
  public void testGetGroovy() {
    Class<?> c = loader.loadClass("/org/tamacat/groovy/test/Groovy_test.groovy");
    assertNotNull(c);
    assertEquals("org.tamacat.groovy.test.Groovy_test", c.getName());
  }
  
  @Test
  public void testRecompile() {
    Class<?> c = loader.loadClass("/org/tamacat/groovy/test/Groovy_test.groovy");
    assertNotNull(c);
    assertEquals("org.tamacat.groovy.test.Groovy_test", c.getName());
    loader.recompile();
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.