public void SerializeCommand_GeneratesData() { var callback = _callbackActivator.SerializeCallback(TestMethod, new CallbackDataTest { Foo = "Bar" }); Assert.IsNotNull(callback.TypeName); Assert.IsNotNull(callback.MethodName); Assert.IsNotNull(callback.Data); }
public void ReportRequestPropertiesContainer_IsSerializedAndDeserializedProperly_UsingCallbackActivator() { var testReportType = "test report type 123"; var testMerchant = "test merchant 123"; var testMwsAuthToken = "test auth token 123"; var marketplaceIdList = new List <string> { "asdf1234", "tyui5678", "vbnm4567" }; ContentUpdateFrequency testUpdateFrequency = ContentUpdateFrequency.Daily; var propertiesContainer = new ReportRequestPropertiesContainer(testReportType, testUpdateFrequency, marketplaceIdList); var serialized = _callbackActivator.SerializeCallback(TestMethod, propertiesContainer); _callbackActivator.CallMethod(serialized, new MemoryStream()); Assert.IsTrue(_called); Assert.AreEqual(testUpdateFrequency, _callbackData.UpdateFrequency); CollectionAssert.AreEqual(marketplaceIdList, _callbackData.MarketplaceIdList); }