Beispiel #1
0
 public void ProcessLiftForLaterMerging_InnerContentsUntouched()
 {
     using (TempFile f = TempFile.CreateWithXmlHeader("<entry id='one'><sense id='foo'><example/></sense></entry>"))
     {
         string output = Utilities.ProcessLiftForLaterMerging(f.Path);
         XmlTestHelper.AssertXPathNotNull(output, "//entry/sense[@id='foo']/example");
         File.Delete(output);
     }
 }
Beispiel #2
0
 public void ProcessLiftForLaterMerging_NoIdAddedIf_NoLexemeFormToUse()
 {
     using (TempFile f = TempFile.CreateWithXmlHeader("<entry></entry>"))
     {
         string output = Utilities.ProcessLiftForLaterMerging(f.Path);
         XmlTestHelper.AssertXPathNotNull(output, "//entry[@guid and not(@id)]");
         File.Delete(output);
     }
 }
Beispiel #3
0
 public void ProcessLiftForLaterMerging_MissingHumanReadableIdsAdded_AlreadyHadGuid()
 {
     using (TempFile f = TempFile.CreateWithXmlHeader("<entry guid='6b4269b9-f5d4-4e48-ad91-17109d9882e4'><lexical-unit ><form lang='v'><text>kindness</text></form></lexical-unit></entry>"))
     {
         string output = Utilities.ProcessLiftForLaterMerging(f.Path);
         XmlTestHelper.AssertXPathNotNull(output, "//entry[@id and @guid]");
         File.Delete(output);
     }
 }
Beispiel #4
0
 public void ProcessLiftForLaterMerging_ExistingGuidsUnchanged()
 {
     using (TempFile f = TempFile.CreateWithXmlHeader("<entry guid='123abc'/>"))
     {
         string output = Utilities.ProcessLiftForLaterMerging(f.Path);
         XmlTestHelper.AssertXPathNotNull(output, "//entry[@guid='123abc']");
         File.Delete(output);
     }
 }
Beispiel #5
0
 public void ProcessLiftForLaterMerging_MissingGuidsAdded()
 {
     using (TempFile file = TempFile.CreateWithXmlHeader("<entry id='one'/><entry id='two'/>"))
     {
         string output = Utilities.ProcessLiftForLaterMerging(file.Path);
         XmlTestHelper.AssertXPathNotNull(output, "//entry[@id='one' and @guid]");
         XmlTestHelper.AssertXPathNotNull(output, "//entry[@id='two' and @guid]");
         File.Delete(output);
     }
 }