BAEL-982 - reformatting

This commit is contained in:
slavisa-baeldung 2017-07-17 19:12:24 +01:00
parent dc0d802cd9
commit 59cb7db53e
4 changed files with 60 additions and 63 deletions

View File

@ -15,7 +15,8 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<properties>

View File

@ -10,7 +10,7 @@ import org.springframework.core.env.Environment;
import com.samskivert.mustache.Mustache;
@SpringBootApplication
@ComponentScan(basePackages = { "com.baeldung" })
@ComponentScan(basePackages = {"com.baeldung"})
public class SpringMustacheApplication {
public static void main(String[] args) {

View File

@ -24,7 +24,7 @@ public class ArticleController {
List<Article> articles = new LinkedList<>();
IntStream.range(0, 10)
.forEach(count -> {
articles.add(generateArticle("Article Title "+count));
articles.add(generateArticle("Article Title " + count));
});
Map<String, Object> modelMap = new HashMap<>();
@ -39,11 +39,9 @@ public class ArticleController {
article.setTitle(title);
article.setBody(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur faucibus tempor diam. In molestie arcu eget ante facilisis sodales. Maecenas porta tellus sapien, eget rutrum nisi blandit in. Mauris tempor auctor ante, ut blandit velit venenatis id. Ut varius, augue aliquet feugiat congue, arcu ipsum finibus purus, dapibus semper velit sapien venenatis magna. Nunc quam ex, aliquet at rutrum sed, vestibulum quis libero. In laoreet libero cursus maximus vulputate. Nullam in fermentum sem. Duis aliquam ullamcorper dui, et dictum justo placerat id. Aliquam pretium orci quis sapien convallis, non blandit est tempus.");
article.setPublishDate(factory.getBirthDate()
.toString());
article.setPublishDate(factory.getBirthDate().toString());
article.setAuthor(factory.getName());
return article;
}
}

View File

@ -22,11 +22,9 @@ public class SpringMustacheApplicationTests {
public void givenIndexPageWhenContainsArticleThenTrue() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/article", String.class);
Assert.assertTrue(entity.getStatusCode()
.equals(HttpStatus.OK));
Assert.assertTrue(entity.getBody()
.contains("Article Title 0"));
Assert.assertTrue(entity.getStatusCode().equals(HttpStatus.OK));
Assert.assertTrue(entity.getBody().contains("Article Title 0"));
}
}