Commit 5a53028b authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add and fix tests

parent 8a8df016
Pipeline #47554 passed with stages
in 6 minutes and 53 seconds
......@@ -222,7 +222,7 @@ class TestPipeline {
@Test
@Disabled
fun `test 5 stuff`() {
fun `test 5 rightsstatement generation`() {
val topics = setupTest(5, "test-5")
while (topics.first.isEmpty) {
......@@ -251,4 +251,33 @@ class TestPipeline {
)
}
@Test
@Disabled
fun `test 6 generic tests`() {
val topics = setupTest(6, "test-6")
assertThat(topics.second.isEmpty)
.withFailMessage("Reports topic is empty.")
.isFalse()
val report = topics.second.readRecord()
val reportKey = report.key
val reportValue = report.value
val record = topics.first.readRecord()
val recordValue = record.value
val recordKey = record.key
assertAll(
{
assertThat(sort(recordValue))
.isEqualTo(sort(readFile("output.nt", 6)))
},
{
assertThat(recordKey)
.isEqualTo("https://memobase.ch/record/rst-001-09")
}
)
}
}
\ No newline at end of file
app:
configTopic: mb-di-config-topic
reportingStepName: test
kafka:
streams:
bootstrap.servers: localhost:12345
application.id: test-client-6
topic:
in: test-topic-in
out: test-topic-out
process: test-process
\ No newline at end of file
{
"Memobase-ID": "212853_1",
"longTitle": "Jazz Konzerte Willisau 2002: Tin Hat Trio",
"broadcast": "Jazz Konzerte Willisau 2002",
"backlink": "https://www.fonoteca.ch/cgi-bin/oecgi3.exe/inet_fnbasedetail?REC_ID=212853.011",
"stream": "https://vault.fonoteca.ch/archive/FILE1-1000/FILE800/FILE800_1.mp3",
"objUniqueKey": "212853.011",
"objLang": "de",
"objCallNr": "FILE800",
"objThumbnailK": "tdb",
"objRemarks": "",
"objSupportType": "Elektronische Ressource mit Fernzugriff",
"objGenre": "Jazzmusik",
"objSchemaProfile": "",
"objItemNbr": "1",
"objItemCondition": "",
"objItemLocation": "FONOTECA NAZIONALE SVIZZERA; Lugano",
"objItemSubLocation": "",
"objItemOrigin": "BIBLIOTHEK HOCHSCHULE LUZERN - MUSIK; Luzern",
"objItemSubOrigin": "W. 1564",
"objItemCollection": "WILLISAU JAZZ ARCHIV",
"objItemReceivedDate": "2014-03-14",
"objItemReceivedOwnership": "Depositum",
"objItemCopies": "",
"isPublic": "0",
"mp3Ready": "1",
"Trägertitel": ["Jazz Konzerte Willisau 2002: Tin Hat Trio"],
"Elektronische Ressource": ["Dati informatici sonori"],
"Produktion": [
{"name": "TROXLER, Niklaus",
"activity": "Ansager"}],
"Produktionsjahr": ["2002"],
"Produktionsart": ["Einmalige Direktproduktion"],
"Musikart": ["Jazz"],
"Position": ["1"],
"Ansagen": ["Announcement"],
"Aktivität": ["Ansager"],
"Interpret": [
{"name": "TIN HAT TRIO"},
{"name": "KIHLSTEDT, Carla",
"instrument": "Violine"},
{"name": "BURGER, Rob",
"instrument": "Akkordeon Klavier"},
{"name": "ORTON, Mark",
"instrument": "Gitarre"}],
"Musikinstrument": ["Violine","Akkordeon","Klavier","Gitarre"],
"Aufnahmeortschaft": ["Willisau"],
"Aufnahmeort": ["JAZZ KONZERT WILLISAU"],
"Aufnahme-Datum": ["12.04.2002"],
"Aufnahme-Bedingungen": ["Direktaufnahme"],
"Applaus": ["Mit Applaus"],
}
\ No newline at end of file
record:
uri: Memobase-ID
identifiers:
original: Memobase-ID
type:
const: "Ton"
title: longTitle
titles:
- main: longTitle
- series: Trägertitel
- broadcast: broadcast
scopeAndContent:
- Produktionsart
- Aufnahme-Bedingungen
- Applaus
sameAs: backlink
abstract:
- prefix:
value: "Ereignis: "
field: Ereignis
- prefix:
value: "Ansagen: "
field: Ansagen
- prefix:
value: "Musikinstrumente: "
field: Musikinstrument
- prefix:
value: "Körperschaft: "
field: Körperschaft
- prefix:
value: "Stimme: "
field: Stimme
descriptiveNote:
- objRemarks
- Bemerkungen/Kommentar
- prefix:
value: "Version: "
field: Version
source:
- objItemOrigin
- objItemSubOrigin
#relation: relatedMaterial
isSponsoredByMemoriav: true
rights:
holder:
const: "HSLU (gemäss Schenkungsvertrag); Es gelten die üblichen Urheber- und anverwandten Schutzrechte"
languages:
- content: #language
const: "Deutsch"
#- caption: captioningFormat
#subject:
# - prefLabel: Keywords
genre:
- prefLabel: objGenre
- prefLabel: Musikart
placeOfCapture:
- name: Aufnahmeortschaft
relatedPlaces:
- name: Aufnahmeortschaft
creationDate: Aufnahme-Datum
#issuedDate: issuedDate
#temporal: PeriodOfTimeDate
creators:
- person:
name: Autor.name
relationName:
- Autor.activity
- Autor.role
#const: "Autor"
#- corporateBody:
# name: creatorCorporateBody.name
# relationName: creatorCorporateBody.role
contributors:
- person:
name: Interpret.name
relationName: Interpret.instrument
#- corporateBody:
# name: contributorCorporateBody.name
# relationName: contributorCorporateBody.role
#- agent:
# name: contributorAgent.name
# relationName: contributorAgent.role
producers:
- person:
name: Produktion.name
relationName:
- Produktion.activity
- Produktion.role
#- person:
# name: producerCorporateBodyName
relatedAgents:
- person:
name: Technik.name
relationName:
- prefix:
value: "Technik"
field: Technik.activity
- person:
name: Teilnehmer.relationName
relationName: Teilnehmer.activity
#- corporateBody:
# name: FeaturedOrganisation
#publishedBy:
# - person:
# name: publisherPerson.name
#- corporateBody:
# name: publisherCorporateBody.name
conditionsOfUse: "Es gelten die üblichen Urheber- und anverwandten Schutzrechte"
physical:
carrierType: objSupportType
#duration: duration
physicalCharacteristics:
- prefix:
value: "Mass:"
field: Mass
- prefix:
value: "Material: "
field: Material
- prefix:
value: "Marke und Modell: "
field: Marke und Modell
- prefix:
value: "Tonaufnahmeverfahren: "
field: Aufnahmeverfahren
- prefix:
value: "Spulage: "
field: Spurlage
- prefix:
value: "Abspielgeschwindigkeit: "
field: Abspielgeschwindigkeit
- prefix:
value: "Zustand: "
field: objItemCondition
identifiers:
callNumber: objCallNr
rights:
access:
const: "onsite"
usage:
name:
const: "In Copyright (InC)"
sameAs:
const: "http://rightsstatements.org/vocab/CNE/1.0/"
digital:
locator: stream #essenceLocator
rights:
access:
const: "private"
usage:
name:
const: "In Copyright (InC)"
sameAs:
const: "http://rightsstatements.org/vocab/CNE/1.0/"
\ No newline at end of file
<https://memobase.ch/record/rst-001-09> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Record> .
<https://memobase.ch/record/rst-001-09> <https://memobase.ch/internal/isPublished> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<https://memobase.ch/record/rst-001-09> <https://www.ica.org/standards/RiC/ontology#heldBy> <https://memobase.ch/institution/ins> .
<https://memobase.ch/record/rst-001-09> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:B .
<https://memobase.ch/record/rst-001-09> <https://www.ica.org/standards/RiC/ontology#isPartOf> <https://memobase.ch/recordSet/rst-001> .
<https://memobase.ch/record/rst-001-09> <https://www.ica.org/standards/RiC/ontology#type> "Film" .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Identifier> .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "rst-001-09" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "main" .
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment