0

我正在尝试实现 zentasks 教程,但我预计会出现一些问题:playframework,找不到带注释的方法并且不运行任何测试。它找到类,但不是方法。

package models;


import org.junit.*;
import static org.junit.Assert.*;
import play.test.WithApplication;
import static play.test.Helpers.*;

public class ModelTest extends WithApplication {
    @Before
    public void setUp() {
        start(fakeApplication(inMemoryDatabase()));
    }

    @Test
    public void createAndRetrieveUser() {
        System.out.println("teste");
        new User("bob@gmail.com", "Bob", "secret").save();
        User bob = User.find.where().eq("email", "bob@gmail.com").findUnique();
        assertNotNull(bob);
        assertEquals("Bob", bob.name);
    }

}

我收到了一些像这样的奇怪字符:

[zentasks] $ test
←[0m[←[0minfo←[0m] ←[0mCompiling 4 Scala sources and 3 Java sources to C:\dev\ecli
←[0m[←[0minfo←[0m] ←[0mCompiling 3 Java sources to C:\dev\eclipse\workspace\zentas
←[0m[←[0minfo←[0m] ←[0mApplicationTest←[0m
←[0m[←[0minfo←[0m] ←[0m←[0m
←[0m[←[0minfo←[0m] ←[0m←[0m
←[0m[←[0minfo←[0m] ←[0mTotal for test ApplicationTest←[0m
←[0m[←[0minfo←[0m] ←[0mFinished in 0.005 seconds←[0m
←[0m[←[0minfo←[0m] ←[0m0 tests, 0 failures, 0 errors←[0m
←[0m[←[0minfo←[0m] ←[0mmodels.ModelTest←[0m
←[0m[←[0minfo←[0m] ←[0m←[0m
←[0m[←[0minfo←[0m] ←[0m←[0m
←[0m[←[0minfo←[0m] ←[0mTotal for test models.ModelTest←[0m
←[0m[←[0minfo←[0m] ←[0mFinished in 0.004 seconds←[0m
←[0m[←[0minfo←[0m] ←[0m0 tests, 0 failures, 0 errors←[0m
←[0m[←[0minfo←[0m] ←[0mIntegrationTest←[0m
←[0m[←[0minfo←[0m] ←[0m←[0m
←[0m[←[0minfo←[0m] ←[0m←[0m
←[0m[←[0minfo←[0m] ←[0mTotal for test IntegrationTest←[0m
←[0m[←[0minfo←[0m] ←[0mFinished in 0.01 seconds←[0m
←[0m[←[0minfo←[0m] ←[0m0 tests, 0 failures, 0 errors←[0m
←[0m[←[0minfo←[0m] ←[0mPassed: : Total 0, Failed 0, Errors 0, Passed 0, Skipped 0←
←[0m[←[32msuccess←[0m] ←[0mTotal time: 12 s, completed 05/09/2013 09:45:31←[0m

谁能解释我做错了什么?谢谢。

4

0 回答 0