public void CallMethod_CallsMethod() { _callbackActivator.CallMethod( new Callback( "EasyMWS.Tests.CallbackActivatorTests, EasyMWS.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "TestMethod", "{\"Foo\":\"123\"}", "EasyMWS.Tests.CallbackActivatorTests+CallbackDataTest, EasyMWS.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"), new MemoryStream() ); Assert.IsTrue(_called); Assert.AreEqual("123", _callbackData.Foo); }
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); }