Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move reporter builder #818

Merged
merged 2 commits into from
Feb 23, 2021
Merged

Move reporter builder #818

merged 2 commits into from
Feb 23, 2021

Conversation

robstoll
Copy link
Owner

part 1 of 2 (I guess) what is missing is to move the Reporter as well


I confirm that I have read the Contributor Agreements v1.0, agree to be bound on them and confirm that my contribution is compliant.

ComponentFactory because we need a way to say we want kind of a
singleton which is re-used in this ComponentFactoryContainer.
We cannot / don't want to make guarantees about creating a singleton
only once, i.e. use computeIfAbsent or similar, because it would mean
we cannot have a singleton component which depends on another
singleton component.

We try at least to create a singleton as less as possible. For this to
work:
- introduce ComponentFactory (as already mentioned)
  - let ComponentFactoryContainer.getFactoryOrNull and
    getFactoryForChainedOrNull return a ComponentFactory instead of a
    simple function
- introduce ConcurrentMap as polyfill

moreover:
- deprecate get/setAtriumProperty and ReporterFactory
- deprecate all Translator and AssertionFormatter specific stuff in
  core-robstoll-lib and move to core
  - configure replacements in DefaultComponentFactoryContainer
  - get rid off most ReporterFactories only keep DefaultReporterFactory
    which we will remove with 0.17.0
- rename RemoveRunnerAtriumError to RemoveRunnerFromAtriumError
- move text specific AssertionFormatter to package `text` as preparation
  for further AssertionFormatters (like html)
- introduce RealTranslatorIntSpec which makes use of
  ComponentFactoryContainer instead of ReporterFactory
@codecov
Copy link

codecov bot commented Feb 23, 2021

Codecov Report

Merging #818 (575f528) into master (c868f30) will increase coverage by 1.43%.
The diff coverage is 92.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #818      +/-   ##
==========================================
+ Coverage   84.74%   86.18%   +1.43%     
==========================================
  Files         437      462      +25     
  Lines        4222     4523     +301     
  Branches      225      262      +37     
==========================================
+ Hits         3578     3898     +320     
+ Misses        596      563      -33     
- Partials       48       62      +14     
Flag Coverage Δ
bbc 76.51% <60.23%> (-1.30%) ⬇️
bc 78.37% <60.23%> (-1.44%) ⬇️
current 83.38% <92.28%> (-0.43%) ⬇️
current_windows 82.09% <92.28%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lin/ch/tutteli/atrium/reporting/ReporterFactory.kt 60.00% <ø> (-10.00%) ⬇️
...rting/translating/ArgumentsSupportingTranslator.kt 95.45% <ø> (+36.36%) ⬆️
...um/reporting/translating/UsingDefaultTranslator.kt 100.00% <ø> (+25.00%) ⬆️
...porting/AssertionFormatterControllerBasedFacade.kt 100.00% <ø> (ø)
.../lib/reporting/AssertionFormatterControllerImpl.kt 95.65% <ø> (ø)
...hildFormattingSingleAssertionGroupTypeFormatter.kt 100.00% <ø> (ø)
...lib/reporting/SingleAssertionGroupTypeFormatter.kt 100.00% <ø> (ø)
...eporting/TextExplanatoryAssertionGroupFormatter.kt 100.00% <ø> (ø)
...ll/lib/reporting/TextFallbackAssertionFormatter.kt 95.65% <ø> (ø)
...ib/reporting/TextFeatureAssertionGroupFormatter.kt 100.00% <ø> (ø)
... and 106 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 c868f30...575f528. Read the comment docs.

@robstoll robstoll merged commit 7deb6a8 into master Feb 23, 2021
@robstoll robstoll linked an issue Feb 23, 2021 that may be closed by this pull request
@robstoll robstoll deleted the move-ReporterBuilder branch March 2, 2021 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor core, don't use ServiceLoader
1 participant