public void FirstOrDefault_TwoInQueue_ReturnsFirstObjectPopulatedWithCorrectData() { var feedSubmissionEntry = _feedSubmissionEntryService.FirstOrDefault(); var feedSubmissionData = JsonConvert.DeserializeObject <FeedSubmissionPropertiesContainer>(feedSubmissionEntry.FeedSubmissionData); Assert.AreEqual(AmazonRegion.Europe, feedSubmissionEntry.AmazonRegion); Assert.AreEqual("TargetHandlerId", feedSubmissionEntry.TargetHandlerId); Assert.AreEqual("{\"key1\":\"value1\"}", feedSubmissionEntry.TargetHandlerArgs); Assert.AreEqual("testFeedType", feedSubmissionEntry.FeedType); CollectionAssert.AreEquivalent(new List <string>(MwsMarketplaceGroup.AmazonEurope().Select(m => m.Id)), feedSubmissionData.MarketplaceIdList); }
public void UnlockFeedSubmissionEntries(IFeedSubmissionEntryService feedSubmissionService, IEnumerable <string> feedSubmissionIds) { foreach (var submissionId in feedSubmissionIds) { var feedSubmissionEntry = feedSubmissionService.FirstOrDefault(fsc => fsc.FeedSubmissionId == submissionId); if (feedSubmissionEntry != null) { feedSubmissionService.Unlock(feedSubmissionEntry, "Unlocking multiple feed submission entries - amazon processing status update has been completed."); feedSubmissionService.Update(feedSubmissionEntry); } } feedSubmissionService.SaveChanges(); }