-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add proper XML-based tests for XMP transformations
This gives me a lot more confidence in the output :)
- Loading branch information
1 parent
a2e8b5a
commit 0e00510
Showing
7 changed files
with
193 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.6.0"> | ||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ablFR="https://ns.ableton.com/xmp/fs-resources/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> | ||
<dc:format>application/vnd.ableton.folder</dc:format> | ||
<ablFR:resource>folder</ablFR:resource> | ||
<ablFR:items> | ||
<rdf:Bag> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd1.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd2.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>ch.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Hihat</rdf:li> | ||
<rdf:li>Drums|Hihat|Closed Hihat</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:items> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.6.0"> | ||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ablFR="https://ns.ableton.com/xmp/fs-resources/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> | ||
<dc:format>application/vnd.ableton.folder</dc:format> | ||
<ablFR:resource>folder</ablFR:resource> | ||
<ablFR:items> | ||
<rdf:Bag> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd1.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd2.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>ch.wav</ablFR:filePath> | ||
</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:items> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.6.0"> | ||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ablFR="https://ns.ableton.com/xmp/fs-resources/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> | ||
<dc:format>application/vnd.ableton.folder</dc:format> | ||
<ablFR:resource>folder</ablFR:resource> | ||
<ablFR:items> | ||
<rdf:Bag> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd1.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd2.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>ch.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Hihat</rdf:li> | ||
<rdf:li>Drums|Hihat|Closed Hihat</rdf:li> | ||
<rdf:li>Creator|17cupsofcoffee</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:items> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.6.0"> | ||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ablFR="https://ns.ableton.com/xmp/fs-resources/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> | ||
<dc:format>application/vnd.ableton.folder</dc:format> | ||
<ablFR:resource>folder</ablFR:resource> | ||
<ablFR:items> | ||
<rdf:Bag> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd1.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>bd2.wav</ablFR:filePath> | ||
<ablFR:keywords> | ||
<rdf:Bag> | ||
<rdf:li>Drums|Kick</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:keywords> | ||
</rdf:li> | ||
<rdf:li rdf:parseType="Resource"> | ||
<ablFR:filePath>ch.wav</ablFR:filePath> | ||
</rdf:li> | ||
</rdf:Bag> | ||
</ablFR:items> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace LiveTagger.Tests; | ||
|
||
/// <summary> | ||
/// Utilities for testing. | ||
/// | ||
/// Based on https://www.honlsoft.com/blog/2022-03-26-unit-testing-reading-reference-data/. | ||
/// </summary> | ||
public static class TestUtils | ||
{ | ||
public static string ReadFileAsString(string file, [CallerFilePath] string filePath = "") | ||
{ | ||
var directoryPath = Path.GetDirectoryName(filePath); | ||
var fullPath = Path.Join(directoryPath, file); | ||
return File.ReadAllText(fullPath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters