Add tests for new insert rules consequence (part 1) v2#1137
Merged
timkimadobe merged 18 commits intoadobe:feature/historical-consequencefrom Apr 29, 2025
Merged
Conversation
… EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one # Conflicts: # AEPCore.xcodeproj/project.pbxproj # AEPCore/Mocks/PublicTestUtils/MockEventHistoryDatabase.swift # AEPCore/Tests/EventHubTests/EventHubEventHistoryTests.swift # AEPCore/Tests/TestHelpers/MockEventHistory.swift
10 tasks
Update EventHistory init to accommodate this read only access to the backing storage
…y related method tests
… EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one
…toryService.swift
41ce3e2 to
1571d75
Compare
db77c50
into
adobe:feature/historical-consequence
17 checks passed
This was referenced Jul 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This PR is based on the logic fix in (and this diff currently also contains its changes):
Once #1136 is merged, this PR should reflect the actual scope of changes.
Description
This PR adds test cases for:
EventHub's EventHistory related methods
One big motivation for adding test coverage here was the update to change EventHub's implementation of
getHistoricalEventsin PR:Where there were no test cases validating the behavior of the handler being called or not in the
eventHistoryisnilcase.Before
After
Event's new support for conversion toEventHistoryRequestvia.toEventHistoryRequestTests the conversion of
Eventinto anEventHistoryRequestespecially when different event masks are set.Other changes
New
MockEventHistorythat provides a mock implementation for theEventHistoryServiceprotocol.Note
Q: Should this be included in AEPCore public test utils? I thought not because only
EventHubusesEventHistoryServiceand alsoeventHistoryis private onEventHubRelated Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: