Alicerce icon indicating copy to clipboard operation
Alicerce copied to clipboard

Add Locate property wrapper for ServiceLocator

Open beloso opened this issue 4 years ago • 1 comments

Checklist

  • [x] I've rebased my changes on top of master
  • [ ] I've built and run the project to see all new and existing tests pass
  • [x] I've followed the Mindera swift style guide
  • [x] I've read the Contribution Guidelines
  • [ ] I've updated the documentation if necessary.

Motivation and Context

With the new Property Wrappers in Swift 5.1 we can improve our ServiceLocator feature. This PR proposes an approach for such a property wrapper.

Description

I've added the new properly wrapper. To test I am thinking about creating a Mock class with a property annotated with this wrapper. Then I can register services in Test Methods and test that this Mock Class can be properly instantiated.

beloso avatar Mar 30 '20 16:03 beloso

Codecov Report

Merging #216 into master will decrease coverage by 1.05%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #216      +/-   ##
==========================================
- Coverage   95.36%   94.31%   -1.06%     
==========================================
  Files         101      102       +1     
  Lines        4036     3234     -802     
==========================================
- Hits         3849     3050     -799     
+ Misses        187      184       -3     
Impacted Files Coverage Δ
Sources/Utils/Locate.swift 0.00% <0.00%> (ø)
Sources/View/ReusableView.swift 69.62% <0.00%> (-5.64%) :arrow_down:
...ources/Network/Resource/HTTPResourceEndpoint.swift 80.00% <0.00%> (-5.19%) :arrow_down:
...ces/Network/Pinning/SecCertificate+PublicKey.swift 85.71% <0.00%> (-4.03%) :arrow_down:
...a/NSPersistentStoreCoordinator+CoreDataStack.swift 80.00% <0.00%> (-3.34%) :arrow_down:
...ics/Trackers/PerformanceMetrics+MultiTracker.swift 92.59% <0.00%> (-2.53%) :arrow_down:
...urces/Persistence/DiskMemoryPersistenceStack.swift 87.95% <0.00%> (-2.53%) :arrow_down:
Sources/Network/Serialize.swift 91.66% <0.00%> (-2.46%) :arrow_down:
Sources/DeepLinking/Route+TrieRouter.swift 91.42% <0.00%> (-2.05%) :arrow_down:
Sources/Network/Pinning/ServerTrustEvaluator.swift 92.77% <0.00%> (-1.73%) :arrow_down:
... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9b9e776...73ffce3. Read the comment docs.

codecov[bot] avatar Mar 30 '20 17:03 codecov[bot]

Closing this following discussion with @beloso. We will revisit this if the need arises.

p4checo avatar Apr 15 '24 12:04 p4checo