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 &<>"'\" type=\"text\"><last_typed>" + d + "</last_typed></typed_history>"; string actual; actual = target.ToOperaLinkXml(); Assert.AreEqual(expected, actual); }