Refactor tests to use AEPTestUtils#433
Merged
timkimadobe merged 12 commits intoadobe:devfrom Nov 15, 2023
Merged
Conversation
Also add UnitTests. prefix to assertEquals due to compiler preference for instance method from AEPTestUtils extension to XCTestCase for JSON comparison over global function defined in UnitTests module
Codecov Report
@@ Coverage Diff @@
## dev #433 +/- ##
=======================================
Coverage 96.76% 96.76%
=======================================
Files 27 27
Lines 1730 1730
=======================================
Hits 1674 1674
Misses 56 56 |
Add line and file params to assertion helper to emit test failure in corresponding test case
cdhoffmann
approved these changes
Nov 13, 2023
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.
Note
The Podfile dependency currently points to a branch of the testutils repo - this can be updated to point to a particular
tag(once release tag is created) using the syntax, ex:pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '1.0.0-beta'Description
This PR brings in the
AEPTestUtilslibrary and replaces existing local versions of test utilities with the following changes:EdgeStateTests.swifthelper method:getPropertiesFromMockDataStoreto accommodate Core 4.2.0 new persistence format for objects (Stringinstead ofData)3. Temporary update to includeUnitTestsprefix toassertEqualsmethod due to compiler preference for instance method fromAEPTestUtilsextension toXCTestCasefor JSON comparison over global function defined inUnitTestsmoduleNote that this is temporary to allow unit tests to pass, and will be replaced in a followup PR that uses the JSON comparison system for dictionary comparisonsUnitTests.prefix is no longer needed since the AnyCodable JSON comparison methods have been refactored to be a custom protocol insteadThe classes were mostly drop in replacements since the
AEPTestUtilsclasses were based on the original Edge versions of the classes.NOTE: Refactor to use the JSON comparison tool for functional and unit tests will be done as a followup PR to help with ease of review process
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: