vite.rxbus.compiler.ProxyBuilderTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxbus-compiler Show documentation
Show all versions of rxbus-compiler Show documentation
RxBus base on RxJava2 & RxAndroid to achieve event bus.
The newest version!
package vite.rxbus.compiler;
import com.squareup.javapoet.ClassName;
import org.junit.Test;
import java.io.File;
import static org.junit.Assert.assertTrue;
/**
* Created by trs on 17-1-5.
*/
public class ProxyBuilderTest {
@Test
public void testCreateClass() {
File file = new File("/home/trs/AndroidStudioProjects/RxBus/exampleTest");
File DemoTestClass = new File(file.getAbsolutePath() + "/vite/demo/MainActivity$$Proxy.java");
ProxyBuilder builder = new ProxyBuilder(ClassName.get("vite.demo", "MainActivity"));
builder.build(file);
assertTrue(file.exists());
assertTrue(DemoTestClass.exists());
}
}