Skip to content

Commit a2e8b5a

Browse files
Fix tests
These are a bit of a mess - I think I'd be better off creating some test fixtures with actual XML.
1 parent 491c063 commit a2e8b5a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

test/XmpTests.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ public void ShouldRemoveTags()
8686
var bd = getItem(xmp.Xml, "bd.wav");
8787
var ch = getItem(xmp.Xml, "ch.wav");
8888

89-
// Removing all tags from a file should remove the entire item.
9089
Assert.Single(bd);
91-
Assert.Empty(ch);
90+
Assert.Single(ch);
9291

9392
var bdTags = getTags(bd.First());
9493

9594
Assert.Contains("Drums|Kick", bdTags);
95+
Assert.Null(ch.First().Element(Ableton.Keywords));
9696
}
9797

9898
[Fact]
@@ -133,9 +133,13 @@ public void ShouldRemoveAllTags()
133133
var bd = getItem(xmp.Xml, "bd.wav");
134134
var ch = getItem(xmp.Xml, "ch.wav");
135135

136-
// Removing all tags from a file should remove the entire item.
137136
Assert.Single(bd);
138-
Assert.Empty(ch);
137+
Assert.Single(ch);
138+
139+
var bdTags = getTags(bd.First());
140+
141+
Assert.Contains("Drums|Kick", bdTags);
142+
Assert.Null(ch.First().Element(Ableton.Keywords));
139143
}
140144

141145
[Fact]

0 commit comments

Comments
 (0)