public void ShouldHaveDataAfterWithDataAndXmlSerializationWithGenericOtherType() { TestData data = new TestData { IsTest = true }; Message testMsg = Message.Create().WithData(data, SerializationType.Xml); Assert.IsNotNull(testMsg); OtherTestData actualData = testMsg.GetData <OtherTestData>(); Assert.AreEqual(data.IsTest, actualData.IsTest); }
public void ShouldHaveDataAfterWithDataAndJsonSerializationWithPassedOtherType() { TestData data = new TestData { IsTest = true }; Message testMsg = Message.Create().WithData(data, SerializationType.Json); Assert.IsNotNull(testMsg); OtherTestData actualData = (OtherTestData)testMsg.GetDataObject(typeof(OtherTestData)); Assert.AreEqual(data.IsTest, actualData.IsTest); }