Here are the examples of the java api play.twirl.api.Content.contentType() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
16
Source : FunctionalTest.java
with MIT License
from Rookout
with MIT License
from Rookout
@Test
public void renderTemplate() {
// If you are calling out to replacedets, then you must instantiate an application
// because it makes use of replacedets metadata that is configured from
// the application.
Content html = views.html.index.render("Your new application is ready.");
replacedertThat("text/html").isEqualTo(html.contentType());
replacedertThat(html.body()).contains("Your new application is ready.");
}
15
Source : FunctionalTest.java
with Apache License 2.0
from reljicd
with Apache License 2.0
from reljicd
@Test
@Ignore
public void renderTemplate() {
// If you are calling out to replacedets, then you must instantiate an application
// because it makes use of replacedets metadata that is configured from
// the application.
Content html = views.html.index.render("Your new application is ready.");
replacedertThat("text/html").isEqualTo(html.contentType());
replacedertThat(html.body()).contains("Your new application is ready.");
}
15
Source : UnitTest.java
with Creative Commons Zero v1.0 Universal
from playframework
with Creative Commons Zero v1.0 Universal
from playframework
@Test
public void checkTemplate() {
Http.RequestBuilder request = CSRFTokenHelper.addCSRFToken(Helpers.fakeRequest("GET", "/"));
Content html = views.html.index.render(request.build());
replacedertThat(html.contentType()).isEqualTo("text/html");
replacedertThat(contentreplacedtring(html)).contains("Add Person");
}