diff --git a/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs b/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs index 5a472b1f..890c9fc2 100644 --- a/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs +++ b/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs @@ -25,8 +25,16 @@ public void GetRows_VerseDescriptiveTitle() { Assert.That(rows, Has.Length.EqualTo(1)); - Assert.That(rows[0].Ref, Is.EqualTo(ScriptureRef.Parse("MAT 1:1"))); - Assert.That(rows[0].Text, Is.EqualTo("Descriptive title")); + Assert.That( + rows[0].Ref, + Is.EqualTo(ScriptureRef.Parse("MAT 1:1")), + string.Join(",", rows.ToList().Select(tr => tr.Text)) + ); + Assert.That( + rows[0].Text, + Is.EqualTo("Descriptive title"), + string.Join(",", rows.ToList().Select(tr => tr.Text)) + ); }); } @@ -44,8 +52,16 @@ public void GetRows_LastSegment() { Assert.That(rows, Has.Length.EqualTo(1)); - Assert.That(rows[0].Ref, Is.EqualTo(ScriptureRef.Parse("MAT 1:1"))); - Assert.That(rows[0].Text, Is.EqualTo("Last segment")); + Assert.That( + rows[0].Ref, + Is.EqualTo(ScriptureRef.Parse("MAT 1:1")), + string.Join(",", rows.ToList().Select(tr => tr.Text)) + ); + Assert.That( + rows[0].Text, + Is.EqualTo("Last segment"), + string.Join(",", rows.ToList().Select(tr => tr.Text)) + ); }); } @@ -67,7 +83,7 @@ public void GetRows_DuplicateVerseWithTable() includeAllText: true ); - Assert.That(rows, Has.Length.EqualTo(5)); + Assert.That(rows, Has.Length.EqualTo(5), string.Join(",", rows.ToList().Select(tr => tr.Text))); } [Test] @@ -77,13 +93,19 @@ public void GetRows_TriplicateVerse() @"\id MAT - Test \c 1 \v 1 First verse +\rem non verse \v 1 First verse +\rem non verse \v 1 First verse +\v 2 Second verse ", includeAllText: true ); - - Assert.That(rows, Has.Length.EqualTo(1)); + Assert.Multiple(() => + { + Assert.That(rows[0].Text, Is.EqualTo("First verse"), string.Join(",", rows.ToList().Select(tr => tr.Text))); + Assert.That(rows, Has.Length.EqualTo(4), string.Join(",", rows.ToList().Select(tr => tr.Text))); + }); } [Test] @@ -104,7 +126,7 @@ public void GetRows_VersePara_BeginningNonVerseSegment() includeAllText: true ); - Assert.That(rows, Has.Length.EqualTo(4)); + Assert.That(rows, Has.Length.EqualTo(4), string.Join(",", rows.ToList().Select(tr => tr.Text))); } private static TextRow[] GetRows(string usfm, bool includeMarkers = false, bool includeAllText = false)