public void TestCancelSubscription_Full() { var cancel = new CancelSubscription {SubscriptionId = 12345}; string actual = cancel.Serialize(); const string expected = @" <cancelSubscription> <subscriptionId>12345</subscriptionId> </cancelSubscription>"; Assert.AreEqual(expected, actual); }
public void testCancelSubscription_OnlyRequired() { var update = new CancelSubscription {SubscriptionId = 12345}; string actual = update.Serialize(); const string expected = @" <cancelSubscription> <subscriptionId>12345</subscriptionId> </cancelSubscription>"; Assert.AreEqual(expected, actual); }
public void testCancelSubscription() { CancelSubscription cancel = new CancelSubscription(); cancel.SubscriptionId = 12345; batchRequest.AddCancelSubscription(cancel); Assert.AreEqual(1, batchRequest.GetNumCancelSubscriptions()); mockLitleFile.Verify(litleFile => litleFile.CreateRandomFile(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<String>(), mockLitleTime.Object)); mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, cancel.Serialize())); }