Polish end of lines
This commit is contained in:
@@ -341,7 +341,6 @@ class IntegrationTests(@Autowired val restTemplate: TestRestTemplate) {
|
||||
@Test
|
||||
fun `Assert article page title, content and status code`() {
|
||||
println(">> TODO")
|
||||
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@@ -627,13 +626,13 @@ We add data initialization to `BlogApplication`.
|
||||
fun databaseInitializer(userRepository: UserRepository, articleRepository: ArticleRepository) = CommandLineRunner {
|
||||
val smaldini = User("smaldini", "Stéphane", "Maldini")
|
||||
userRepository.save(smaldini)
|
||||
|
||||
articleRepository.save(Article(
|
||||
"Reactor Bismuth is out",
|
||||
"Lorem ipsum",
|
||||
"dolor **sit** amet https://projectreactor.io/",
|
||||
smaldini,
|
||||
1
|
||||
|
||||
))
|
||||
articleRepository.save(Article(
|
||||
"Reactor Aluminium has landed",
|
||||
@@ -641,7 +640,6 @@ fun databaseInitializer(userRepository: UserRepository, articleRepository: Artic
|
||||
"dolor **sit** amet https://projectreactor.io/",
|
||||
smaldini,
|
||||
2
|
||||
|
||||
))
|
||||
}
|
||||
----
|
||||
@@ -675,7 +673,6 @@ class IntegrationTests(@Autowired val restTemplate: TestRestTemplate) {
|
||||
assertThat(entity.statusCode).isEqualTo(HttpStatus.OK)
|
||||
assertThat(entity.body).contains("Reactor Aluminium has landed",,
|
||||
"<a href=\"https://projectreactor.io/\">https://projectreactor.io/</a>")
|
||||
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@@ -683,7 +680,6 @@ class IntegrationTests(@Autowired val restTemplate: TestRestTemplate) {
|
||||
println(">> Tear down")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
----
|
||||
|
||||
@@ -804,6 +800,7 @@ class BlogProperties {
|
||||
var title: String? = null
|
||||
lateinit var content: String
|
||||
}
|
||||
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ class BlogApplication {
|
||||
fun databaseInitializer(userRepository: UserRepository, articleRepository: ArticleRepository) = CommandLineRunner {
|
||||
val smaldini = User("smaldini", "Stéphane", "Maldini")
|
||||
userRepository.save(smaldini)
|
||||
|
||||
articleRepository.save(Article(
|
||||
"Reactor Bismuth is out",
|
||||
"Lorem ipsum",
|
||||
"dolor **sit** amet https://projectreactor.io/",
|
||||
smaldini,
|
||||
1
|
||||
|
||||
))
|
||||
articleRepository.save(Article(
|
||||
"Reactor Aluminium has landed",
|
||||
@@ -33,7 +33,6 @@ class BlogApplication {
|
||||
"dolor **sit** amet https://projectreactor.io/",
|
||||
smaldini,
|
||||
2
|
||||
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,5 @@ class BlogProperties {
|
||||
var title: String? = null
|
||||
lateinit var content: String
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ private fun getOrdinal(n: Int) = when {
|
||||
n % 10 == 2 -> "${n}nd"
|
||||
n % 10 == 3 -> "${n}rd"
|
||||
else -> "${n}th"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,5 +48,3 @@ class HtmlController(private val repository: ArticleRepository,
|
||||
val addedAt: String)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,4 +29,4 @@ class UserController(private val repository: UserRepository) {
|
||||
|
||||
@GetMapping("/{login}")
|
||||
fun findOne(@PathVariable login: String) = repository.findById(login)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ data class User(
|
||||
@Id val login: String,
|
||||
val firstname: String,
|
||||
val lastname: String,
|
||||
val description: String? = null)
|
||||
val description: String? = null)
|
||||
|
||||
@@ -6,4 +6,4 @@ interface ArticleRepository : CrudRepository<Article, Long> {
|
||||
fun findAllByOrderByAddedAtDesc(): Iterable<Article>
|
||||
}
|
||||
|
||||
interface UserRepository : CrudRepository<User, String>
|
||||
interface UserRepository : CrudRepository<User, String>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
blog.title=Blog
|
||||
blog.banner.title=Warning
|
||||
blog.banner.content=The blog will be down tomorrow.
|
||||
blog.banner.content=The blog will be down tomorrow.
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{> footer}}
|
||||
{{> footer}}
|
||||
|
||||
@@ -28,4 +28,4 @@
|
||||
{{/articles}}
|
||||
</div>
|
||||
|
||||
{{> footer}}
|
||||
{{> footer}}
|
||||
|
||||
@@ -13,7 +13,6 @@ import org.mockito.Mockito.any
|
||||
import org.springframework.http.MediaType
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.*
|
||||
|
||||
|
||||
@ExtendWith(SpringExtension::class)
|
||||
@WebMvcTest
|
||||
// TODO Use constructor-based val property for @MockBean when supported, see issue spring-boot#13113
|
||||
@@ -56,4 +55,4 @@ class HttpApiTests(@Autowired val mockMvc: MockMvc) {
|
||||
.andExpect(jsonPath("\$.[1].login").value(smaldini.login))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ class IntegrationTests(@Autowired val restTemplate: TestRestTemplate) {
|
||||
assertThat(entity.statusCode).isEqualTo(HttpStatus.OK)
|
||||
assertThat(entity.body).contains("Reactor Aluminium has landed",
|
||||
"<a href=\"https://projectreactor.io/\">https://projectreactor.io/</a>")
|
||||
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
|
||||
@@ -1 +1 @@
|
||||
junit.jupiter.testinstance.lifecycle.default = per_class
|
||||
junit.jupiter.testinstance.lifecycle.default = per_class
|
||||
|
||||
Reference in New Issue
Block a user