Ejemplo n.º 1
0
 public void TypedHistoryWrapperConstructorTest()
 {
     TypedHistoryWrapper target = new TypedHistoryWrapper();
       Assert.AreEqual(SyncState.Added, target.State);
       Assert.AreEqual("<typed_history />", target.ToOperaLinkXml());
 }
Ejemplo n.º 2
0
 public void ToOperaLinkXmlTest()
 {
     var lt = new System.DateTime(2010, 4, 30, 20, 21, 22, System.DateTimeKind.Local);
       TypedHistoryWrapper target = new TypedHistoryWrapper
       {
     Content = new TypedHistory
     {
       Content = "foo bar &<>\"'",
       Type = "text",
       LastTyped = lt
     },
     State = SyncState.Added
       };
       string d = lt.ToW3CDTFInUtc();
       string expected = "<typed_history status=\"added\" content=\"foo bar &amp;&lt;>&quot;'\" type=\"text\"><last_typed>" + d + "</last_typed></typed_history>";
       string actual;
       actual = target.ToOperaLinkXml();
       Assert.AreEqual(expected, actual);
 }