You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Src/xWorks/xWorksTests/ConfiguredXHTMLGeneratorTests.cs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -483,6 +483,12 @@ public void GenerateContentForEntry_HomographNumbersGeneratesCorrectResult()
483
483
XHTMLStringBuilder.Append(result);
484
484
XHTMLStringBuilder.AppendLine("</TESTWRAPPER>");
485
485
486
+
// Normally the propertyvalue for a headword with homograph number is IMultiStringAccessor.
487
+
// However, in the test setup the propertyvalue for homograph number is an int
488
+
// and therefore hits the int case of GenerateContentForValue in ConfiguredLcmGenerator,
489
+
// and is directed to "GenerateContentForSimpleString", which applies the first analysis WS.
490
+
// This creates an extra "/span[@lang='en' and text()=...]" at the end of the lexentry.
491
+
// We don't care if a WS is assigned, so we ignore this possible extra span and check only for the correct homograph number.
486
492
varentryWithHomograph="/TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber' and text()=1] | /TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber']/*[text()=1]";
entryWithHomograph="/TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber' and text()=2] | /TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber']/*[text()=2]";
0 commit comments