Beispiel #1
0
		public void DocumentStart()
		{
			using (var session = new LiftExportAsFullDocumentTestSession())
			{
				//NOTE: the utf-16 here is an artifact of the xmlwriter when writing to a stringbuilder,
				//which is what we use for tests.  The file version puts out utf-8
				//CheckAnswer("<?xml version=\"1.0\" encoding=\"utf-16\"?><lift producer=\"WeSay.1Pt0Alpha\"/>");// xmlns:flex=\"http://fieldworks.sil.org\" />");
				session.LiftWriter.End();
				AssertHasAtLeastOneMatch(string.Format("lift[@version='{0}']", Validator.LiftVersion), session);
				AssertHasAtLeastOneMatch(string.Format("lift[@producer='{0}']", LiftWriter.ProducerString), session);
			}
		}
Beispiel #2
0
		public void AddUsingWholeList_TwoEntries_HasTwoEntries()
		{
			using (var session = new LiftExportAsFullDocumentTestSession())
			{
				session.AddTwoTestLexEntries();
				var doc = new XmlDocument();
				doc.LoadXml(session.StringBuilder.ToString());
				Assert.AreEqual(2, doc.SelectNodes("lift/entry").Count);
			}
		}