Enable detekt rules AlsoCouldBeApply and fix existing issues.
This commit is contained in:
parent
e0255777c0
commit
19e81825ff
4 changed files with 8 additions and 10 deletions
|
|
@ -101,7 +101,7 @@ class DefaultLastMessageTimestampFormatterTest {
|
|||
* Create DefaultLastMessageFormatter and set current time to the provided date.
|
||||
*/
|
||||
private fun createFormatter(@Suppress("SameParameterValue") currentDate: String): LastMessageTimestampFormatter {
|
||||
val clock = FakeClock().also { it.givenInstant(Instant.parse(currentDate)) }
|
||||
val clock = FakeClock().apply { givenInstant(Instant.parse(currentDate)) }
|
||||
val localDateTimeProvider = LocalDateTimeProvider(clock, TimeZone.UTC)
|
||||
val dateFormatters = DateFormatters(Locale.US, clock, TimeZone.UTC)
|
||||
return DefaultLastMessageTimestampFormatter(localDateTimeProvider, dateFormatters)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue