예제 #1
0
        public void toXmlString10Test()
        {
            TreeMap <String, CarOptions> opts2_ = new TreeMap <String, CarOptions>(new ReverseComparer());

            opts2_.put("1", CarOptions.SunRoof);
            opts2_.put("2", CarOptions.FogLights);
            Assert.AreEqual("<Util.Util.TreeMap types=\"`2[[System.String, mscorlib], [Util.CarOptions, Util]]\"><StreamTests.StreamTests.ReverseComparer class=\"Util.Util.ListableKey\" Comparer=\"\"/><mscorlib.System.String class=\"Util.Util.ListableKey\" key=\"\" value=\"2\"/><Util.Util.CarOptions class=\"Util.Util.ListableKey\" value=\"FogLights\"/><mscorlib.System.String class=\"Util.Util.ListableKey\" key=\"\" value=\"1\"/><Util.Util.CarOptions class=\"Util.Util.ListableKey\" value=\"SunRoof\"/></Util.Util.TreeMap>", SerializeXmlObject.toXmlString(opts2_));
        }
예제 #2
0
        public void toXmlString11Test()
        {
            CarOptions j_ = CarOptions.Spoiler | CarOptions.SunRoof;

            Assert.AreEqual("<Util.Util.CarOptions value=\"SunRoof, Spoiler\"/>", SerializeXmlObject.toXmlString(j_));
        }
예제 #3
0
 public void toXmlString7Test()
 {
     Assert.AreEqual("<StreamTests.StreamTests.Rate value=\"1/2\"/>", SerializeXmlObject.toXmlString(new Rate(1, 2)));
 }
예제 #4
0
 public void toXmlString8Test()
 {
     Assert.AreEqual("<StreamTests.StreamTests.Composite><mscorlib.System.Int64 field=\"num\" class=\"StreamTests.StreamTests.Composite\" value=\"1\"/><mscorlib.System.Int64 field=\"den\" class=\"StreamTests.StreamTests.Composite\" value=\"2\"/></StreamTests.StreamTests.Composite>", SerializeXmlObject.toXmlString(new Composite(1, 2)));
 }
예제 #5
0
        public void toXmlString5Test()
        {
            Map <String, CarOptions> opts2_ = new Map <String, CarOptions>();

            opts2_.put("1", CarOptions.SunRoof);
            Assert.AreEqual("<Util.Util.Map types=\"`2[[System.String, mscorlib], [Util.CarOptions, Util]]\"><mscorlib.System.String class=\"Util.Util.ListableKey\" key=\"\" value=\"1\"/><Util.Util.CarOptions class=\"Util.Util.ListableKey\" value=\"SunRoof\"/></Util.Util.Map>", SerializeXmlObject.toXmlString(opts2_));
        }
예제 #6
0
        public void toXmlString6Test()
        {
            int k_ = 4;

            Assert.AreEqual("<mscorlib.System.Int32 value=\"4\"/>", SerializeXmlObject.toXmlString(k_));
        }
예제 #7
0
 public void toXmlString4Test()
 {
     Assert.AreEqual("<mscorlib.System.String value=\"hello\"/>", SerializeXmlObject.toXmlString("hello"));
 }
예제 #8
0
        public void toXmlString3Test()
        {
            MyList <CarOptions> opts_ = new MyList <CarOptions>();

            opts_.Add(CarOptions.SunRoof);
            Assert.AreEqual("<Util.Util.MyList types=\"`1[[Util.CarOptions, Util]]\"><Util.Util.CarOptions class=\"mscorlib.System.Collections.IEnumerable\" value=\"SunRoof\"/></Util.Util.MyList>", SerializeXmlObject.toXmlString(opts_));
        }
예제 #9
0
        public void toXmlString1Test()
        {
            long i_ = 1;

            Assert.AreEqual("<mscorlib.System.Int64 value=\"1\"/>", SerializeXmlObject.toXmlString(i_));
        }
예제 #10
0
        public void toXmlString13Test()
        {
            ArrayClass arr_ = new ArrayClass();

            int[] i_ = new int[2];
            i_[0] = 5;
            i_[1] = 3;
            arr_.setSampleArray(i_);
            Assert.AreEqual("<StreamTests.StreamTests.ArrayClass><array field=\"sampleArray\" class=\"StreamTests.StreamTests.ArrayClass\" type=\"mscorlib.System.Int32\"><mscorlib.System.Int32 value=\"5\"/><mscorlib.System.Int32 value=\"3\"/></array></StreamTests.StreamTests.ArrayClass>", SerializeXmlObject.toXmlString(arr_));
        }
예제 #11
0
        public void toXmlString12Test()
        {
            char i_ = '1';

            Assert.AreEqual("<mscorlib.System.Char value=\"1\"/>", SerializeXmlObject.toXmlString(i_));
        }