Skip to content

Commit

Permalink
add source-independent contributor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-butcher committed Apr 5, 2024
1 parent da8ed41 commit b46b5b4
Show file tree
Hide file tree
Showing 2 changed files with 404 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object MarcContributors
val primaries = record
.fieldsWithTags("100", "110", "111")
val secondaries = record.fieldsWithTags("700", "710", "711")
filterSecondaryDuplicates(
filterDuplicates(
(primaries ++ secondaries)
.flatMap(field => singleContributor(field))
).toList.harmoniseOntologyTypes
Expand All @@ -59,7 +59,7 @@ object MarcContributors
*
* We do not want this duplication in the output.
*/
private def filterSecondaryDuplicates(allContributors: Output): Output = {
private def filterDuplicates(allContributors: Output): Output = {
val duplicatedContributors =
allContributors
.filter(_.primary == false)
Expand Down
Loading

0 comments on commit b46b5b4

Please sign in to comment.