public void AddTest() { var dic = new XSolonDictionary(); dic.Add("Test", "Balu"); ArgumentException ex1 = null; try { dic.Add("Test", "Balu"); } catch (ArgumentException ex) { ex1 = ex; } Assert.IsNotNull(ex1); }
public void XSolonDictionaryTest() { var dic = new XSolonDictionary(); dic.Add("Test", "Balu"); string raw = dic.Serialize(); Trace.WriteLine(raw); XSolonDictionary dic2 = raw.DeserializeString<XSolonDictionary>(); Assert.AreEqual(dic2, dic); }
public void XSolonDictionaryTest() { var dic = new XSolonDictionary(); dic.Add("Test", "Balu"); string raw = dic.Serialize(); Trace.WriteLine(raw); XSolonDictionary dic2 = raw.DeserializeString <XSolonDictionary>(); Assert.AreEqual(dic2, dic); }
public void LoggerClassSerializationTest() { var dic = new XSolonDictionary(); var logger = new List <LoggerClass>() { new LoggerClass("Default", new TraceDestination()), new LoggerClass("Handler", new TraceDestination()) }; dic.Add("Test", logger); var raw = dic.Serialize(new Type[] { typeof(List <LoggerClass>), typeof(LoggerClass), typeof(TraceDestination) }); Trace.TraceInformation(raw); }