Ejemplo n.º 1
0
        public void Test_WorkItemProgress_subclass_roundtrip()
        {
            var requestA = new TestProgressA();
            var requestB = new TestProgressB();

            var a = Serializer.SerializeWorkItemProgress(requestA);
            var b = Serializer.SerializeWorkItemProgress(requestB);

            // ensure that we get instances of the correct sub-classes back, even if we ask for the base-class
            Assert.IsInstanceOf(typeof(TestProgressA), Serializer.DeserializeWorkItemProgress(a));
            Assert.IsInstanceOf(typeof(TestProgressB), Serializer.DeserializeWorkItemProgress(b));
        }
Ejemplo n.º 2
0
		public void Test_WorkItemProgress_subclass_roundtrip()
		{
			var requestA = new TestProgressA();
			var requestB = new TestProgressB();

			var a = Serializer.SerializeWorkItemProgress(requestA);
			var b = Serializer.SerializeWorkItemProgress(requestB);

			// ensure that we get instances of the correct sub-classes back, even if we ask for the base-class
			Assert.IsInstanceOf(typeof (TestProgressA), Serializer.DeserializeWorkItemProgress(a));
			Assert.IsInstanceOf(typeof (TestProgressB), Serializer.DeserializeWorkItemProgress(b));
		}