Skip to content

Commit

Permalink
chore(TestAssertions): Directly import assertThat
Browse files Browse the repository at this point in the history
  • Loading branch information
guicamest committed Dec 5, 2023
1 parent 30e4442 commit 131a958
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.sleepcamel.gduplicatefinder.core

import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThat
import java.nio.file.Path

fun Collection<DuplicateGroup>.assertOneDuplicateGroupWith(
paths: List<Path>,
content: String,
) {
Assertions.assertThat(this).withFailMessage { "Expected 1 duplicate group" }.hasSize(1)
assertThat(this).withFailMessage { "Expected 1 duplicate group" }.hasSize(1)
first().also { group ->
Assertions.assertThat(group.hash).isEqualTo(content.contentHash())
Assertions.assertThat(
assertThat(group.hash).isEqualTo(content.contentHash())
assertThat(
group.paths.map { it.path }.realPaths(),
).containsExactlyInAnyOrderElementsOf(paths.realPaths())
}
Expand Down

0 comments on commit 131a958

Please sign in to comment.