Skip to content

Instantly share code, notes, and snippets.

Avatar

Rodrigo Yoshima rodrigoy

View GitHub Profile
View DbUnitHelper.java
package util;
import java.io.FileInputStream;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import org.dbunit.IDatabaseTester;
import org.dbunit.JdbcDatabaseTester;
import org.dbunit.dataset.IDataSet;
View gist:653522
<?xml version="1.0" encoding="UTF-8"?>
<project name="beckanos-java" default="assembly" basedir=".">
<description>VRaptor 3 site module build</description>
<path id="tests.classpath" path=".">
<fileset dir="src/content/WEB-INF/lib">
<include name="*.jar" />
</fileset>
View Pedido.java
import junit.framework.Assert;
import org.junit.Test;
/**
* Ora, pois, deve mostrar na tela há quanto tempo o pedido foi emitido...
* @author Joaquim Manoel
*
*/
public class PedidoTest {
View injecting repositories on windsor
private static void AddCustomRepositoriesTo(IWindsorContainer container) {
container.Register(
AllTypes.Pick()
.FromAssemblyNamed("AlphaLog.Data")
.WithService.FirstNonGenericCoreInterface("AlphaLog.Core"));
}