Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }