public void TestGetObjectData2() { StreamingContext sc = new StreamingContext(); SerializationInfo si = new SerializationInfo(typeof(LoggerException), new FormatterConverter()); LoggerException le; string message = "message"; string errorCode = "CS0000"; string helpKeyword = "helpKeyword"; Exception e = new Exception("Inner exception message"); le = new LoggerException(message, e, errorCode, helpKeyword); le.GetObjectData(si, sc); Assert.AreEqual(errorCode, si.GetString("errorCode"), "A1"); Assert.AreEqual(helpKeyword, si.GetString("helpKeyword"), "A2"); }
public void TestGetObjectData1() { LoggerException le = new LoggerException(); le.GetObjectData(null, new StreamingContext()); }