{"action":"created","comment":{"url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/comments/198457031","pull_request_review_id":132388755,"id":198457031,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODQ1NzAzMQ==","diff_hunk":"@@ -635,189 +513,618 @@ public void QueueReportsAccordingToProcessingStatus_UpdateReportRequestId()\n \t\t\t\t(\"Report4\", null, \"_OTHER_\")\n \t\t\t};\n \n-\t\t\t_requestReportProcessor.QueueReportsAccordingToProcessingStatus(_reportRequestCallbackServiceMock.Object, data);\n+\t\t\t_requestReportProcessor.QueueReportsAccordingToProcessingStatus(_reportRequestServiceMock.Object, data);\n \n \t\t\tAssert.IsNull(_reportRequestCallbacks.First().RequestReportId);\n-\t\t\tAssert.IsTrue(_reportRequestCallbacks.First().RequestRetryCount > 0);\n-\t\t\t_reportRequestCallbackServiceMock.Verify(x => x.Update(It.IsAny<ReportRequestEntry>()), Times.Once);\n+\t\t\tAssert.IsTrue(_reportRequestCallbacks.First().ReportProcessRetryCount > 0);\n+\t\t\t_reportRequestServiceMock.Verify(x => x.Update(It.IsAny<ReportRequestEntry>()), Times.Once);\n \t\t}\n \n \t\t[Test]\n-\t\tpublic void GetNextFromQueueOfReportsToDownload_ReturnListOfReports_GeneratedIdNotNull_ForGivenRegionAndMerchantId()\n+\t\tpublic void DownloadGeneratedReportFromAmazon_ShouldCallMwsGetReportOnce()\n \t\t{\n \t\t\t// Arrange\n-\t\t\tvar merchantId2 = \"test merchant id 2\";\n-\t\t\tvar data = new List<ReportRequestEntry>\n+\t\t\tvar merchantId = \"testMerchantId\";\n+\t\t\tvar propertiesContainer = new ReportRequestPropertiesContainer(\"testReportType\", ContentUpdateFrequency.Unknown);\n+\t\t\tvar serializedReportRequestData = JsonConvert.SerializeObject(propertiesContainer);\n+\n+\t\t\tvar reportRequestCallback = new ReportRequestEntry(serializedReportRequestData)\n \t\t\t{\n-\t\t\t\tnew ReportRequestEntry\n-\t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = _merchantId,\n-\t\t\t\t\tId = 2,\n-\t\t\t\t\tRequestReportId = \"Report1\",\n-\t\t\t\t\tGeneratedReportId = null\n-\t\t\t\t},\n-\t\t\t\tnew ReportRequestEntry\n-\t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = merchantId2,\n-\t\t\t\t\tId = 3,\n-\t\t\t\t\tRequestReportId = \"Report2\",\n-\t\t\t\t\tGeneratedReportId = \"GeneratedIdTest2\"\n-\t\t\t\t},\n-\t\t\t\tnew ReportRequestEntry\n-\t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = _merchantId,\n-\t\t\t\t\tId = 4,\n-\t\t\t\t\tRequestReportId = \"Report2\",\n-\t\t\t\t\tGeneratedReportId = \"GeneratedIdTest2\"\n-\t\t\t\t},\n-\t\t\t\tnew ReportRequestEntry\n-\t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = _merchantId,\n-\t\t\t\t\tId = 5,\n-\t\t\t\t\tRequestReportId = \"Report3\",\n-\t\t\t\t\tGeneratedReportId = \"GeneratedIdTest3\"\n-\t\t\t\t},\n-\t\t\t\tnew ReportRequestEntry\n-\t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.NorthAmerica, MerchantId = _merchantId,\n-\t\t\t\t\tId = 6,\n-\t\t\t\t\tRequestReportId = \"Report4\",\n-\t\t\t\t\tGeneratedReportId = null\n-\t\t\t\t}\n+\t\t\t\tData = null,\n+\t\t\t\tAmazonRegion = AmazonRegion.Europe,\n+\t\t\t\tId = 4,\n+\t\t\t\tRequestReportId = \"Report3\",\n+\t\t\t\tGeneratedReportId = \"GeneratedIdTest1\",\n+\t\t\t\tMerchantId = merchantId\n \t\t\t};\n-\t\t\t_reportRequestCallbacks.AddRange(data);\n \n-\t\t\tvar result = _requestReportProcessor.GetNextFromQueueOfReportsToDownload(_reportRequestCallbackServiceMock.Object);\n+\t\t\t_reportRequestCallbacks.Add(reportRequestCallback);\n+\n+\t\t\t// Act\n+\t\t\tvar testData = _reportRequestCallbacks.Find(x => x.GeneratedReportId == \"GeneratedIdTest1\");\n+\t\t\t_requestReportProcessor.DownloadGeneratedReportFromAmazon(_reportRequestServiceMock.Object, testData);\n \n-\t\t\tAssert.AreEqual(4, result.Id);\n+\t\t\t// Assert\n+\t\t\t_marketplaceWebServiceClientMock.Verify(x => x.GetReport(It.IsAny<GetReportRequest>()), Times.Once);\n \t\t}\n \n \t\t[Test]\n-\t\tpublic void GetNextFromQueueOfReportsToDownload_CalledWithNullMerchantId_ReturnsNull()\n+\t\tpublic void DownloadGeneratedReportFromAmazon_WithDownloadSuccessfulAndValidHash_ReportContentSavedInDbAsZip()\n \t\t{\n-\t\t\t// Arrange\n-\t\t\tvar data = new List<ReportRequestEntry>\n+\t\t\tvar expectedReportContent = StreamHelper.CreateMemoryStream(\"This is some test content. Und die Katze läuft auf der Straße.\");\n+\t\t\tvar expectedMd5HashValue = MD5ChecksumHelper.ComputeHashForAmazon(expectedReportContent);\n+\n+\t\t\t_marketplaceWebServiceClientMock.Setup(mws => mws.GetReport(It.IsAny<GetReportRequest>()))\n+\t\t\t\t.Callback<GetReportRequest>((req) => { expectedReportContent.CopyTo(req.Report); })\n+\t\t\t\t.Returns(new GetReportResponse { GetReportResult = new GetReportResult { ContentMD5 = expectedMd5HashValue } });\n+\n+\t\t\tvar reportRequestEntryBeingUpdated = (ReportRequestEntry)null;\n+\t\t\t_reportRequestServiceMock.Setup(rrp => rrp.Update(It.IsAny<ReportRequestEntry>())).Callback<ReportRequestEntry>(((entry) =>\n \t\t\t{\n+\t\t\t\treportRequestEntryBeingUpdated = entry;\n+\t\t\t}));\n+\n+\t\t\t_requestReportProcessor.DownloadGeneratedReportFromAmazon(_reportRequestServiceMock.Object,\n \t\t\t\tnew ReportRequestEntry\n \t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = _merchantId,\n-\t\t\t\t\tId = 2,\n-\t\t\t\t\tRequestReportId = \"Report1\",\n-\t\t\t\t\tGeneratedReportId = null\n-\t\t\t\t},\n+\t\t\t\t\tLastAmazonRequestDate = DateTime.MinValue,\n+\t\t\t\t\tReportType = \"testReportType\",\n+\t\t\t\t\tDetails = null,\n+\t\t\t\t\tGeneratedReportId = \"generatedReportId\",\n+\t\t\t\t\tMerchantId = _merchantId\n+\t\t\t\t});\n+\n+\t\t\tAssert.NotNull(reportRequestEntryBeingUpdated.Details);\n+\n+\t\t\texpectedReportContent.Position = 0;\n+\t\t\tusing (var expectedReportReader = new StreamReader(expectedReportContent))\n+\t\t\tusing (var actualReportReader = new StreamReader(ExtractArchivedSingleFileToStream(reportRequestEntryBeingUpdated.Details.ReportContent)))\n+\t\t\t{\n+\t\t\t\tAssert.AreEqual(expectedReportReader.ReadToEnd(), actualReportReader.ReadToEnd());\n+\t\t\t}\n+\n+\t\t\tAssert.AreEqual(0, reportRequestEntryBeingUpdated.ReportRequestRetryCount);\n+\t\t\tAssert.AreEqual(DateTime.UtcNow.Day, reportRequestEntryBeingUpdated.LastAmazonRequestDate.Day);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Update(It.IsAny<ReportRequestEntry>()), Times.Once);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Delete(It.IsAny<ReportRequestEntry>()), Times.Never);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.SaveChanges(), Times.Once);\n+\t\t}\n+\n+\t\t[Test]\n+\t\tpublic void DownloadGeneratedReportFromAmazon_WithDownloadSuccessfulAndInvalidHash_RetryCountIncremented()\n+\t\t{\n+\t\t\tvar expectedReportContent = StreamHelper.CreateMemoryStream(\"This is some test content. Und die Katze läuft auf der Straße.\");\n+\t\t\tvar nonMatchingMd5HashValue = $\"{MD5ChecksumHelper.ComputeHashForAmazon(expectedReportContent)} non_matching_seq\" ;\n+\n+\t\t\t_marketplaceWebServiceClientMock.Setup(mws => mws.GetReport(It.IsAny<GetReportRequest>()))\n+\t\t\t\t.Callback<GetReportRequest>((req) => { expectedReportContent.CopyTo(req.Report); })\n+\t\t\t\t.Returns(new GetReportResponse { GetReportResult = new GetReportResult { ContentMD5 = nonMatchingMd5HashValue } });\n+\n+\t\t\tvar reportRequestEntryBeingUpdated = (ReportRequestEntry)null;\n+\t\t\t_reportRequestServiceMock.Setup(rrp => rrp.Update(It.IsAny<ReportRequestEntry>())).Callback<ReportRequestEntry>(((entry) =>\n+\t\t\t{\n+\t\t\t\treportRequestEntryBeingUpdated = entry;\n+\t\t\t}));\n+\n+\t\t\t_requestReportProcessor.DownloadGeneratedReportFromAmazon(_reportRequestServiceMock.Object,\n \t\t\t\tnew ReportRequestEntry\n \t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = null,\n-\t\t\t\t\tId = 3,\n-\t\t\t\t\tRequestReportId = \"Report2\",\n-\t\t\t\t\tGeneratedReportId = \"GeneratedIdTest2\"\n-\t\t\t\t},\n+\t\t\t\t\tLastAmazonRequestDate = DateTime.MinValue,\n+\t\t\t\t\tReportType = \"testReportType\",\n+\t\t\t\t\tDetails = null,\n+\t\t\t\t\tGeneratedReportId = \"generatedReportId\",\n+\t\t\t\t\tMerchantId = _merchantId\n+\t\t\t\t});\n+\n+\t\t\tAssert.IsNull(reportRequestEntryBeingUpdated.Details);\n+\t\t\tAssert.AreEqual(1, reportRequestEntryBeingUpdated.ReportDownloadRetryCount);\n+\t\t\tAssert.AreEqual(DateTime.UtcNow.Day, reportRequestEntryBeingUpdated.LastAmazonRequestDate.Day);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Update(It.IsAny<ReportRequestEntry>()), Times.Once);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Delete(It.IsAny<ReportRequestEntry>()), Times.Never);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.SaveChanges(), Times.Once);\n+\t\t}\n+\n+\t\t[TestCase(\"AccessToReportDenied\")]\n+\t\t[TestCase(\"InvalidReportId\")]\n+\t\t[TestCase(\"InvalidReportType\")]\n+\t\t[TestCase(\"InvalidRequest\")]\n+\t\t[TestCase(\"ReportNoLongerAvailable\")]\n+\t\tpublic void DownloadGeneratedReportFromAmazon_WithAmazonReturningFatalExceptionResponse_EntryIsDeletedFromDb(string fatalErrorCode)\n+\t\t{\n+\t\t\t_marketplaceWebServiceClientMock.Setup(mws => mws.GetReport(It.IsAny<GetReportRequest>()))\n+\t\t\t\t.Throws(new MarketplaceWebServiceException(\"message\", HttpStatusCode.BadRequest, fatalErrorCode, \"errorType\", \"123\", \"xml\", new ResponseHeaderMetadata()));\n+\n+\t\t\tvar reportRequestEntryBeingUpdated = (ReportRequestEntry)null;\n+\t\t\t_reportRequestServiceMock.Setup(rrp => rrp.Update(It.IsAny<ReportRequestEntry>())).Callback<ReportRequestEntry>(((entry) =>\n+\t\t\t{\n+\t\t\t\treportRequestEntryBeingUpdated = entry;\n+\t\t\t}));\n+\n+\t\t\t_requestReportProcessor.DownloadGeneratedReportFromAmazon(_reportRequestServiceMock.Object,\n \t\t\t\tnew ReportRequestEntry\n \t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = null,\n-\t\t\t\t\tId = 4,\n-\t\t\t\t\tRequestReportId = \"Report2\",\n-\t\t\t\t\tGeneratedReportId = \"GeneratedIdTest2\"\n-\t\t\t\t},\n+\t\t\t\t\tLastAmazonRequestDate = DateTime.MinValue,\n+\t\t\t\t\tReportType = \"testReportType\",\n+\t\t\t\t\tDetails = null,\n+\t\t\t\t\tGeneratedReportId = \"generatedReportId\",\n+\t\t\t\t\tMerchantId = _merchantId\n+\t\t\t\t});\n+\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Update(It.IsAny<ReportRequestEntry>()), Times.Never);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Delete(It.IsAny<ReportRequestEntry>()), Times.Once);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.SaveChanges(), Times.Once);\n+\t\t}\n+\n+\t\t[TestCase(\"ReportNotReady\")]\n+\t\t[TestCase(\"InvalidScheduleFrequency\")]\n+\t\t[TestCase(\"SomeUnhandledNewErrorCode\")]\n+\t\tpublic void DownloadGeneratedReportFromAmazon_WithAmazonReturningNonFatalExceptionResponse_RetryCountIncremented(string nonFatalErrorCode)\n+\t\t{\n+\t\t\t_marketplaceWebServiceClientMock.Setup(mws => mws.GetReport(It.IsAny<GetReportRequest>()))\n+\t\t\t\t.Throws(new MarketplaceWebServiceException(\"message\", HttpStatusCode.BadRequest, nonFatalErrorCode, \"errorType\", \"123\", \"xml\", new ResponseHeaderMetadata()));\n+\n+\t\t\tvar reportRequestEntryBeingUpdated = (ReportRequestEntry)null;\n+\t\t\t_reportRequestServiceMock.Setup(rrp => rrp.Update(It.IsAny<ReportRequestEntry>())).Callback<ReportRequestEntry>(((entry) =>\n+\t\t\t{\n+\t\t\t\treportRequestEntryBeingUpdated = entry;\n+\t\t\t}));\n+\n+\t\t\t_requestReportProcessor.DownloadGeneratedReportFromAmazon(_reportRequestServiceMock.Object,\n \t\t\t\tnew ReportRequestEntry\n \t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.Europe, MerchantId = null,\n-\t\t\t\t\tId = 5,\n-\t\t\t\t\tRequestReportId = \"Report3\",\n-\t\t\t\t\tGeneratedReportId = \"GeneratedIdTest3\"\n-\t\t\t\t},\n+\t\t\t\t\tLastAmazonRequestDate = DateTime.MinValue,\n+\t\t\t\t\tReportType = \"testReportType\",\n+\t\t\t\t\tDetails = null,\n+\t\t\t\t\tGeneratedReportId = \"generatedReportId\",\n+\t\t\t\t\tMerchantId = _merchantId\n+\t\t\t\t});\n+\n+\t\t\tAssert.IsNull(reportRequestEntryBeingUpdated.Details);\n+\t\t\tAssert.AreEqual(1, reportRequestEntryBeingUpdated.ReportDownloadRetryCount);\n+\t\t\tAssert.AreEqual(DateTime.UtcNow.Day, reportRequestEntryBeingUpdated.LastAmazonRequestDate.Day);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Update(It.IsAny<ReportRequestEntry>()), Times.Once);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Delete(It.IsAny<ReportRequestEntry>()), Times.Never);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.SaveChanges(), Times.Once);\n+\t\t}\n+\n+\t\t[Test]\n+\t\tpublic void DownloadGeneratedReportFromAmazon_WithArbitraryExceptionThrownWhenCallingAmazon_RetryCountIncremented()\n+\t\t{\n+\t\t\t_marketplaceWebServiceClientMock.Setup(mws => mws.GetReport(It.IsAny<GetReportRequest>()))\n+\t\t\t\t.Throws(new Exception(\"Random exception thrown during download attempt\"));\n+\n+\t\t\tvar reportRequestEntryBeingUpdated = (ReportRequestEntry)null;\n+\t\t\t_reportRequestServiceMock.Setup(rrp => rrp.Update(It.IsAny<ReportRequestEntry>())).Callback<ReportRequestEntry>(((entry) =>\n+\t\t\t{\n+\t\t\t\treportRequestEntryBeingUpdated = entry;\n+\t\t\t}));\n+\n+\t\t\t_requestReportProcessor.DownloadGeneratedReportFromAmazon(_reportRequestServiceMock.Object,\n \t\t\t\tnew ReportRequestEntry\n \t\t\t\t{\n-\t\t\t\t\tAmazonRegion = AmazonRegion.NorthAmerica, MerchantId = null,\n-\t\t\t\t\tId = 6,\n-\t\t\t\t\tRequestReportId = \"Report4\",\n-\t\t\t\t\tGeneratedReportId = null\n-\t\t\t\t}\n+\t\t\t\t\tLastAmazonRequestDate = DateTime.MinValue,\n+\t\t\t\t\tReportType = \"testReportType\",\n+\t\t\t\t\tDetails = null,\n+\t\t\t\t\tGeneratedReportId = \"genReportId\",\n+\t\t\t\t\tMerchantId = _merchantId\n+\t\t\t\t});\n+\n+\t\t\tAssert.IsNull(reportRequestEntryBeingUpdated.Details);\n+\t\t\tAssert.AreEqual(1, reportRequestEntryBeingUpdated.ReportDownloadRetryCount);\n+\t\t\tAssert.AreEqual(DateTime.UtcNow.Day, reportRequestEntryBeingUpdated.LastAmazonRequestDate.Day);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Update(It.IsAny<ReportRequestEntry>()), Times.Once);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.Delete(It.IsAny<ReportRequestEntry>()), Times.Never);\n+\t\t\t_reportRequestServiceMock.Verify(rrp => rrp.SaveChanges(), Times.Once);\n+\t\t}\n+\n+\t\t[Test]\n+\t\tpublic void CleanupReportRequests_DeletesReportRequests_WithRetryCountAboveMaxRetryCount()\n+\t\t{\n+\t\t\tvar propertiesContainer = new ReportRequestPropertiesContainer(\"testReportType\", ContentUpdateFrequency.Unknown);\n+\t\t\tvar serializedReportRequestData = JsonConvert.SerializeObject(propertiesContainer);\n+\n+\t\t\tvar testReportRequestCallbacks = new List<ReportRequestEntry>\n+\t\t\t{\n+\t\t\t\tnew ReportRequestEntry {Id = 1, ReportRequestRetryCount = 0, ReportRequestData = serializedReportRequestData, DateCreated = DateTime.UtcNow.AddDays(-2), AmazonRegion = _region, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 2, ReportRequestRetryCount = 1, ReportRequestData = serializedReportRequestData, DateCreated = DateTime.UtcNow.AddDays(-1).AddHours(-1), AmazonRegion = _region, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 3, ReportRequestRetryCount = 2, ReportRequestData = serializedReportRequestData, DateCreated = DateTime.UtcNow.AddDays(-1).AddHours(1),  AmazonRegion = _region, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 4, ReportRequestRetryCount = 3, ReportRequestData = serializedReportRequestData, DateCreated = DateTime.UtcNow.AddHours(-6), AmazonRegion = _region, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 5, ReportRequestRetryCount = 4, ReportRequestData = serializedReportRequestData, DateCreated = DateTime.UtcNow.AddHours(-6), AmazonRegion = _region, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 6, ReportRequestRetryCount = 5, ReportRequestData = serializedReportRequestData, DateCreated = DateTime.UtcNow.AddHours(-6), AmazonRegion = _region, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 7, ReportRequestRetryCount = 5, ReportRequestData = serializedReportRequestData, AmazonRegion = AmazonRegion.Brazil, MerchantId = _merchantId },\n+\t\t\t\tnew ReportRequestEntry {Id = 8, ReportRequestRetryCount = 5, ReportRequestData = serializedReportRequestData, AmazonRegion = _region, MerchantId = \"someDifferentMerchantId\" }\n+\t\t\t}.AsQueryable();\n+\t\t\t_reportRequestServiceMock.Setup(x => x.GetAll()).Returns(testReportRequestCallbacks);\n+\n+\t\t\t_requestReportProcessor.CleanupReportRequests(_reportRequestServiceMock.Object);\n+\n+\t\t\t// Id=6 deleted - ReportRequestMaxRetryCount. Id=1,2 deleted ReportDownloadRequestEntryExpirationPeriod=1day exceeded.\n+\t\t\t_reportRequestServiceMock.Verify(x => x.Delete(It.IsAny<ReportRequestEntry>()), Times.Exactly(3));\n+\t\t}\n+\n+\t\tprivate const int RetryCountIsStrictlyBelowConfiguredRetryCountLimit = -2;\n+\t\tprivate const int RetryCountIsBelowConfiguredRetryCountLimitEdge = -1;\n+\t\tprivate const int RetryCountIsEqualToConfiguredRetryCountLimit = 0;\n+\t\tprivate const int RetryCountIsAboveConfiguredRetryCountLimitEdge = 1;\n+\t\tprivate const int RetryCountIsStrictlyAboveConfiguredRetryCountLimit = 2;\n+\n+\t\t[TestCase(RetryCountIsStrictlyBelowConfiguredRetryCountLimit, false)]\n+\t\t[TestCase(RetryCountIsBelowConfiguredRetryCountLimitEdge, false)]\n+\t\t[TestCase(RetryCountIsEqualToConfiguredRetryCountLimit, false)]\n+\t\t[TestCase(RetryCountIsAboveConfiguredRetryCountLimitEdge, true)]\n+\t\t[TestCase(RetryCountIsStrictlyAboveConfiguredRetryCountLimit, true)]\n+\t\tpublic void CleanupReportRequests_OneEntryWithRequestRetryCountExceeded_DeletesOnlyTheCorrectEntry(int retryCountType, bool shouldEntryBeDeleted)\n+\t\t{\n+\t\t\tvar propertiesContainer = new ReportRequestPropertiesContainer(\"testReportType\", ContentUpdateFrequency.Unknown);\n+\t\t\tvar data = JsonConvert.SerializeObject(propertiesContainer);\n+\n+\t\t\tvar retryCount =\n+\t\t\t\tretryCountType == -2 ? 0 :","path":"src/EasyMWS/EasyMWS.Tests/Processors/RequestReportProcessorTests.cs","position":1037,"original_position":1037,"commit_id":"c17de0f697fef578d5d1f91ad821054ca5d27a20","original_commit_id":"c17de0f697fef578d5d1f91ad821054ca5d27a20","user":{"login":"cazangabriel","id":15629966,"node_id":"MDQ6VXNlcjE1NjI5OTY2","avatar_url":"https://avatars1.githubusercontent.com/u/15629966?v=4","gravatar_id":"","url":"https://api.github.com/users/cazangabriel","html_url":"https://github.com/cazangabriel","followers_url":"https://api.github.com/users/cazangabriel/followers","following_url":"https://api.github.com/users/cazangabriel/following{/other_user}","gists_url":"https://api.github.com/users/cazangabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/cazangabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazangabriel/subscriptions","organizations_url":"https://api.github.com/users/cazangabriel/orgs","repos_url":"https://api.github.com/users/cazangabriel/repos","events_url":"https://api.github.com/users/cazangabriel/events{/privacy}","received_events_url":"https://api.github.com/users/cazangabriel/received_events","type":"User","site_admin":false},"body":"they are not the same, retryCount  is the actual number of retries that is being simulated on the entity under test. The const properties above represent a series of codes that determine whether the retryCount should be lower, equal or higher compared to the maxRetryLimit under test.","created_at":"2018-06-27T11:19:35Z","updated_at":"2018-06-27T11:19:35Z","html_url":"https://github.com/MountainWarehouse/EasyMWS/pull/56#discussion_r198457031","pull_request_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/comments/198457031"},"html":{"href":"https://github.com/MountainWarehouse/EasyMWS/pull/56#discussion_r198457031"},"pull_request":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56"}},"in_reply_to_id":198151993},"pull_request":{"url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56","id":196456869,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NDU2ODY5","html_url":"https://github.com/MountainWarehouse/EasyMWS/pull/56","diff_url":"https://github.com/MountainWarehouse/EasyMWS/pull/56.diff","patch_url":"https://github.com/MountainWarehouse/EasyMWS/pull/56.patch","issue_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/56","number":56,"state":"open","locked":false,"title":"Feature/handle additional scenarios for feeds","user":{"login":"cazangabriel","id":15629966,"node_id":"MDQ6VXNlcjE1NjI5OTY2","avatar_url":"https://avatars1.githubusercontent.com/u/15629966?v=4","gravatar_id":"","url":"https://api.github.com/users/cazangabriel","html_url":"https://github.com/cazangabriel","followers_url":"https://api.github.com/users/cazangabriel/followers","following_url":"https://api.github.com/users/cazangabriel/following{/other_user}","gists_url":"https://api.github.com/users/cazangabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/cazangabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazangabriel/subscriptions","organizations_url":"https://api.github.com/users/cazangabriel/orgs","repos_url":"https://api.github.com/users/cazangabriel/repos","events_url":"https://api.github.com/users/cazangabriel/events{/privacy}","received_events_url":"https://api.github.com/users/cazangabriel/received_events","type":"User","site_admin":false},"body":"@Chillout93 could you also let Michal know when you're doing the code review, so he can join you?","created_at":"2018-06-21T13:43:09Z","updated_at":"2018-06-27T11:19:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78a2139f44baefefcc64e900063392ea9b5db38a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Chillout93","id":3492169,"node_id":"MDQ6VXNlcjM0OTIxNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/3492169?v=4","gravatar_id":"","url":"https://api.github.com/users/Chillout93","html_url":"https://github.com/Chillout93","followers_url":"https://api.github.com/users/Chillout93/followers","following_url":"https://api.github.com/users/Chillout93/following{/other_user}","gists_url":"https://api.github.com/users/Chillout93/gists{/gist_id}","starred_url":"https://api.github.com/users/Chillout93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chillout93/subscriptions","organizations_url":"https://api.github.com/users/Chillout93/orgs","repos_url":"https://api.github.com/users/Chillout93/repos","events_url":"https://api.github.com/users/Chillout93/events{/privacy}","received_events_url":"https://api.github.com/users/Chillout93/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56/commits","review_comments_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56/comments","review_comment_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/56/comments","statuses_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/statuses/c17de0f697fef578d5d1f91ad821054ca5d27a20","head":{"label":"MountainWarehouse:feature/HandleAdditionalScenariosForFeeds","ref":"feature/HandleAdditionalScenariosForFeeds","sha":"c17de0f697fef578d5d1f91ad821054ca5d27a20","user":{"login":"MountainWarehouse","id":35921352,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1OTIxMzUy","avatar_url":"https://avatars2.githubusercontent.com/u/35921352?v=4","gravatar_id":"","url":"https://api.github.com/users/MountainWarehouse","html_url":"https://github.com/MountainWarehouse","followers_url":"https://api.github.com/users/MountainWarehouse/followers","following_url":"https://api.github.com/users/MountainWarehouse/following{/other_user}","gists_url":"https://api.github.com/users/MountainWarehouse/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainWarehouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainWarehouse/subscriptions","organizations_url":"https://api.github.com/users/MountainWarehouse/orgs","repos_url":"https://api.github.com/users/MountainWarehouse/repos","events_url":"https://api.github.com/users/MountainWarehouse/events{/privacy}","received_events_url":"https://api.github.com/users/MountainWarehouse/received_events","type":"Organization","site_admin":false},"repo":{"id":120657246,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA2NTcyNDY=","name":"EasyMWS","full_name":"MountainWarehouse/EasyMWS","owner":{"login":"MountainWarehouse","id":35921352,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1OTIxMzUy","avatar_url":"https://avatars2.githubusercontent.com/u/35921352?v=4","gravatar_id":"","url":"https://api.github.com/users/MountainWarehouse","html_url":"https://github.com/MountainWarehouse","followers_url":"https://api.github.com/users/MountainWarehouse/followers","following_url":"https://api.github.com/users/MountainWarehouse/following{/other_user}","gists_url":"https://api.github.com/users/MountainWarehouse/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainWarehouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainWarehouse/subscriptions","organizations_url":"https://api.github.com/users/MountainWarehouse/orgs","repos_url":"https://api.github.com/users/MountainWarehouse/repos","events_url":"https://api.github.com/users/MountainWarehouse/events{/privacy}","received_events_url":"https://api.github.com/users/MountainWarehouse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MountainWarehouse/EasyMWS","description":"MWS Client that abstracts away the request/check/download cycle.","fork":false,"url":"https://api.github.com/repos/MountainWarehouse/EasyMWS","forks_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/forks","keys_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/teams","hooks_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/hooks","issue_events_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/events{/number}","events_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/events","assignees_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/assignees{/user}","branches_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/branches{/branch}","tags_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/tags","blobs_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/refs{/sha}","trees_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/statuses/{sha}","languages_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/languages","stargazers_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/stargazers","contributors_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/contributors","subscribers_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/subscribers","subscription_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/subscription","commits_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/commits{/sha}","git_commits_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/commits{/sha}","comments_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/comments{/number}","issue_comment_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/comments{/number}","contents_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/contents/{+path}","compare_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/merges","archive_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/downloads","issues_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues{/number}","pulls_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls{/number}","milestones_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/milestones{/number}","notifications_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/labels{/name}","releases_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/releases{/id}","deployments_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/deployments","created_at":"2018-02-07T18:54:19Z","updated_at":"2018-06-12T16:13:39Z","pushed_at":"2018-06-26T11:34:30Z","git_url":"git://github.com/MountainWarehouse/EasyMWS.git","ssh_url":"git@github.com:MountainWarehouse/EasyMWS.git","clone_url":"https://github.com/MountainWarehouse/EasyMWS.git","svn_url":"https://github.com/MountainWarehouse/EasyMWS","homepage":"","size":787,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"MountainWarehouse:develop","ref":"develop","sha":"c4a042933ecefcf2d296016068c7b00f74118ca3","user":{"login":"MountainWarehouse","id":35921352,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1OTIxMzUy","avatar_url":"https://avatars2.githubusercontent.com/u/35921352?v=4","gravatar_id":"","url":"https://api.github.com/users/MountainWarehouse","html_url":"https://github.com/MountainWarehouse","followers_url":"https://api.github.com/users/MountainWarehouse/followers","following_url":"https://api.github.com/users/MountainWarehouse/following{/other_user}","gists_url":"https://api.github.com/users/MountainWarehouse/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainWarehouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainWarehouse/subscriptions","organizations_url":"https://api.github.com/users/MountainWarehouse/orgs","repos_url":"https://api.github.com/users/MountainWarehouse/repos","events_url":"https://api.github.com/users/MountainWarehouse/events{/privacy}","received_events_url":"https://api.github.com/users/MountainWarehouse/received_events","type":"Organization","site_admin":false},"repo":{"id":120657246,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA2NTcyNDY=","name":"EasyMWS","full_name":"MountainWarehouse/EasyMWS","owner":{"login":"MountainWarehouse","id":35921352,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1OTIxMzUy","avatar_url":"https://avatars2.githubusercontent.com/u/35921352?v=4","gravatar_id":"","url":"https://api.github.com/users/MountainWarehouse","html_url":"https://github.com/MountainWarehouse","followers_url":"https://api.github.com/users/MountainWarehouse/followers","following_url":"https://api.github.com/users/MountainWarehouse/following{/other_user}","gists_url":"https://api.github.com/users/MountainWarehouse/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainWarehouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainWarehouse/subscriptions","organizations_url":"https://api.github.com/users/MountainWarehouse/orgs","repos_url":"https://api.github.com/users/MountainWarehouse/repos","events_url":"https://api.github.com/users/MountainWarehouse/events{/privacy}","received_events_url":"https://api.github.com/users/MountainWarehouse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MountainWarehouse/EasyMWS","description":"MWS Client that abstracts away the request/check/download cycle.","fork":false,"url":"https://api.github.com/repos/MountainWarehouse/EasyMWS","forks_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/forks","keys_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/teams","hooks_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/hooks","issue_events_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/events{/number}","events_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/events","assignees_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/assignees{/user}","branches_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/branches{/branch}","tags_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/tags","blobs_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/refs{/sha}","trees_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/statuses/{sha}","languages_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/languages","stargazers_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/stargazers","contributors_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/contributors","subscribers_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/subscribers","subscription_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/subscription","commits_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/commits{/sha}","git_commits_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/git/commits{/sha}","comments_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/comments{/number}","issue_comment_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/comments{/number}","contents_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/contents/{+path}","compare_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/merges","archive_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/downloads","issues_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues{/number}","pulls_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls{/number}","milestones_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/milestones{/number}","notifications_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/labels{/name}","releases_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/releases{/id}","deployments_url":"https://api.github.com/repos/MountainWarehouse/EasyMWS/deployments","created_at":"2018-02-07T18:54:19Z","updated_at":"2018-06-12T16:13:39Z","pushed_at":"2018-06-26T11:34:30Z","git_url":"git://github.com/MountainWarehouse/EasyMWS.git","ssh_url":"git@github.com:MountainWarehouse/EasyMWS.git","clone_url":"https://github.com/MountainWarehouse/EasyMWS.git","svn_url":"https://github.com/MountainWarehouse/EasyMWS","homepage":"","size":787,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56"},"html":{"href":"https://github.com/MountainWarehouse/EasyMWS/pull/56"},"issue":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/56"},"comments":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/MountainWarehouse/EasyMWS/statuses/c17de0f697fef578d5d1f91ad821054ca5d27a20"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cazangabriel"}}