Exemplo n.º 1
0
 /// <summary>
 /// </summary>
 /// <param name="args">
 /// the command line arguments
 /// </param>
 public void TestEmptyMapEntry() {
     Strategy resolver = new CycleStrategy("id", "ref");
     Serializer s = new Persister(resolver);
     StringWriter w = new StringWriter();
     SimpleBug1 bug1 = new SimpleBug1();
     AssertEquals(bug1.test1.data.get("key1"), "value1");
     AssertEquals(bug1.test1.data.get("key2"), "value1");
     AssertEquals(bug1.test1.data.get("key3"), "");
     AssertEquals(bug1.test1.data.get(""), "");
     s.write(bug1, w);
     System.err.println(w.toString());
     SimpleBug1 bug2 = s.read(SimpleBug1.class, w.toString());
Exemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="args">
        /// the command line arguments
        /// </param>
        public void TestEmptyMapEntry()
        {
            Strategy     resolver = new CycleStrategy("id", "ref");
            Serializer   s        = new Persister(resolver);
            StringWriter w        = new StringWriter();
            SimpleBug1   bug1     = new SimpleBug1();

            AssertEquals(bug1.test1.data.get("key1"), "value1");
            AssertEquals(bug1.test1.data.get("key2"), "value1");
            AssertEquals(bug1.test1.data.get("key3"), "");
            AssertEquals(bug1.test1.data.get(""), "");
            s.write(bug1, w);
            System.err.println(w.toString());
            SimpleBug1 bug2 = s.read(SimpleBug1.class, w.toString());