Skip to content

Instantly share code, notes, and snippets.

Cédric Exbrayat cexbrayat

Block or report user

Report or block cexbrayat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am cexbrayat on github.
  • I am cexbrayat (https://keybase.io/cexbrayat) on keybase.
  • I have a public key whose fingerprint is 2FE5 4D6B 6141 6BC3 0539 E6BC ADA5 BF0D D06C 7207

To claim this, I am signing this object:

@cexbrayat
cexbrayat / AppMongoTest.java
Created Jul 29, 2012
Blog - Play!, MongoDB et Morphia - AppMongoTest.java
View AppMongoTest.java
import models.App;
import org.junit.Test;
import java.util.List;
public class AppMongoTest extends MongoTest {
@Test
public void saveNewApp() {
App app = new App();
app.name = "camel-ref";
@cexbrayat
cexbrayat / MongoPlayJUnitRunner.java
Created Jul 29, 2012
Blog - Play!, MongoDB et Morphia - MongoPlayJUnitRunner.java
View MongoPlayJUnitRunner.java
public class MongoPlayJUnitRunner extends PlayJUnitRunner {
static int PORT = 27017;
static {
try {
MongodConfig config = new MongodConfig(Version.V2_0, PORT, Network.localhostIsIPv6());
MongodExecutable prepared = MongoDBRuntime.getDefaultInstance().prepare(config);
prepared.start();
new Mongo("localhost", PORT);
@cexbrayat
cexbrayat / MongoTest.java
Created Jul 29, 2012
Blog - Play!, MongoDB et Morphia - MongoTest.java
View MongoTest.java
@RunWith(MongoPlayJUnitRunner.class)
public class MongoTest extends org.junit.Assert {
@Rule
public PlayJUnitRunner.StartPlay startPlayBeforeTests = PlayJUnitRunner.StartPlay.rule();
}
@cexbrayat
cexbrayat / AppTest.java
Created Jul 29, 2012
Blog - Play!, MongoDB et Morphia - AppTest.java
View AppTest.java
import models.App;
import org.junit.Test;
import play.test.UnitTest;
import java.util.List;
public class AppTest extends UnitTest {
@Test
public void saveNewApp() {
App app = new App();
@cexbrayat
cexbrayat / App.java
Created Jul 29, 2012
Blog - Play!, MongoDB et Morphia - App.java
View App.java
@Entity
public class App extends Model {
public String name;
}
You can’t perform that action at this time.