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)); }
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)); }