-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
4 changed files
with
25 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +0,0 @@ | ||
import play.mvc.Controller; | ||
import play.mvc.Result; | ||
import views.html.index; | ||
|
||
public class Application extends Controller | ||
{ | ||
|
||
public Result index( ) | ||
{ | ||
return ok( index.render( "Your new application is ready." ) ); | ||
} | ||
|
||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +0,0 @@ | ||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import org.junit.*; | ||
|
||
import play.mvc.*; | ||
import play.test.*; | ||
import play.i18n.Lang; | ||
import play.libs.F; | ||
import play.libs.F.*; | ||
import play.twirl.api.Content; | ||
|
||
import static play.test.Helpers.*; | ||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* | ||
* Simple (JUnit) tests that can call all parts of a play app. | ||
* If you are interested in mocking a whole application, see the wiki for more details. | ||
* | ||
*/ | ||
public class ApplicationTest { | ||
|
||
@Test | ||
public void simpleCheck() { | ||
int a = 1 + 1; | ||
assertEquals(2, a); | ||
} | ||
|
||
@Test | ||
public void renderTemplate() { | ||
Content html = views.html.index.render("Your new application is ready."); | ||
assertEquals("text/html", contentType(html)); | ||
assertTrue(contentAsString(html).contains("Your new application is ready.")); | ||
} | ||
|
||
|
||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters