@@ -1415,6 +1415,40 @@ public void MergeCreatedDateWorks()
14151415 "The DateCreated of the entries should match the import data." ) ;
14161416 }
14171417 }
1418+
1419+ [ Test ]
1420+ public void DialectLabelMergeWorks ( )
1421+ {
1422+ var xid = new XmlImportData ( m_cache , false ) ;
1423+ using ( var reader = new StringReader ( "<LexDb xmlns:msxsl=\" urn:schemas-microsoft-com:xslt\" xmlns:user=\" urn:my-scripts\" >" +
1424+ "<Entries><LexEntry><LexemeForm><MoStemAllomorph><MorphType><Link ws=\" en\" name=\" stem\" />" +
1425+ "</MorphType><Form><AUni ws=\" cub\" >ãcʉriojomecacʉ</AUni></Form></MoStemAllomorph></LexemeForm>" +
1426+ "<DateCreated><Time val=\" 2011-09-14 12:00:00.000\" /></DateCreated>" +
1427+ "<DialectLabels><Link ws=\" en\" abbr=\" C\" name=\" C\" /></DialectLabels><EntryRefs><LexEntryRef>" +
1428+ "<ComponentLexemes><Link ws=\" cub\" entry=\" ãcʉriojʉmecacʉ\" /></ComponentLexemes></LexEntryRef></EntryRefs>" +
1429+ "</LexEntry>" +
1430+ "<LexEntry id=\" IID0E3\" ><LexemeForm><MoStemAllomorph><MorphType><Link ws=\" en\" name=\" stem\" /></MorphType>" +
1431+ "<Form><AUni ws=\" cub\" >ãcʉriojʉmecacʉ</AUni></Form></MoStemAllomorph></LexemeForm>" +
1432+ "<DateCreated><Time val=\" 2011-09-14 12:00:00.000\" /></DateCreated>" +
1433+ "<DialectLabels><Link ws=\" en\" abbr=\" Q\" name=\" Q\" /><Link ws=\" en\" abbr=\" V\" name=\" V\" /></DialectLabels>" +
1434+ "<MorphoSyntaxAnalyses><MoStemMsa id=\" MSA1000\" ><PartOfSpeech><Link ws=\" en\" abbr=\" s.\" /></PartOfSpeech>" +
1435+ "</MoStemMsa></MorphoSyntaxAnalyses><Senses><LexSense><Definition><AStr ws=\" en\" >" +
1436+ "<Run ws=\" en\" >tree species cf jocʉcʉ</Run></AStr></Definition>" +
1437+ "<MorphoSyntaxAnalysis><Link target=\" MSA1000\" /></MorphoSyntaxAnalysis></LexSense></Senses></LexEntry>" +
1438+ "<LexEntry><LexemeForm><MoStemAllomorph><MorphType><Link ws=\" en\" name=\" stem\" /></MorphType>" +
1439+ "<Form><AUni ws=\" cub\" >ãcʉriojomecacʉ</AUni></Form></MoStemAllomorph></LexemeForm>" +
1440+ "<EntryRefs><LexEntryRef><VariantEntryTypes><Link ws=\" es\" name=\" Variante\" /></VariantEntryTypes>" +
1441+ "<ComponentLexemes><Link target=\" IID0E3\" /></ComponentLexemes></LexEntryRef></EntryRefs></LexEntry>" +
1442+ "</Entries></LexDb>" ) )
1443+ using ( var writer = new StringWriter ( new StringBuilder ( ) ) )
1444+ {
1445+ xid . ImportData ( reader , writer , null ) ;
1446+ var entries = m_cache . LangProject . LexDbOA . Entries . ToArray ( ) ;
1447+ Assert . That ( entries . Length , Is . EqualTo ( 2 ) , "The lexicon should have 2 entries." ) ;
1448+ Assert . That ( entries [ 0 ] . DialectLabelsRS . Count , Is . EqualTo ( 2 ) ) ;
1449+ Assert . That ( entries [ 1 ] . DialectLabelsRS . Count , Is . EqualTo ( 1 ) ) ;
1450+ }
1451+ }
14181452 ///--------------------------------------------------------------------------------------
14191453 /// <summary>
14201454 /// Tests the method ImportData() on sequence lexical relations.
0 commit comments