we cannot yet remove it because we still have addAssertion on Expect
and if we remove it, would also have one on AssertionContainer. Two
different definitions which would not work together. This also means:
- deprecate addAssertion/addAssertionsCreatedBy/createAndAddAssertion
in Expect, add append... to AssertionContainer
moreover:
- adjust packages.md, also remove deprecaed modules there and remove
documentation which is no longer used
- remove createRegisterJsServicesTask in build.gradle
- adjust bbc/bc due to breaking changes (removal of different types).
in the same go we have to forgive bc for infix as we no longer have
ReporterFactory and since we don't use ascii bullet points in infix
tests any more since 0.16.0 - we have established own tests for this
aspect
- rename RealTranslatorIntSpec to TranslatorIntSpec and remove the
existing TranslatorIntSpec which was intended for ReporterFactory
based implementations.
instead of only one. Moreover, use an explanatory assertion group with
a warning group type. Looks then as follows:
expected that subject: /tmp/spek16789805802838758490/notEmpty (sun.nio.fs.UnixPath <1842823132>)
◆ is: an empty directory
❗❗ directory contains:
⚬ f5 (sun.nio.fs.UnixPath <1295966993>)
⚬ f2 (sun.nio.fs.UnixPath <878629898>)
⚬ f3 (sun.nio.fs.UnixPath <1318008636>)
⚬ f0 (sun.nio.fs.UnixPath <452118766>)
⚬ f1 (sun.nio.fs.UnixPath <552502986>)
⚬ f8 (sun.nio.fs.UnixPath <1657993305>)
⚬ f9 (sun.nio.fs.UnixPath <1439892968>)
⚬ f4 (sun.nio.fs.UnixPath <1508512260>)
⚬ f6 (sun.nio.fs.UnixPath <224794405>)
⚬ f7 (sun.nio.fs.UnixPath <2013476576>)
⚬ ...
moreover:
- cleanup samples, isNotEmptyDirectory should actually be in
isEmptyDirectory because we might have a isNotEmptyDirectory in the
future. Same same for isSymbolicLink.
- move PathAssertionSamples also to deprecated package
- rename toBeASymbolicLink to isSymbolicLink for now. Will do the rename
once we rename all
-
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
moreover:
- rename collectForDifferentSubject to collectBasedOnSubject
- use DefaultComponentFactoryContainer only in RootExpectImpl and
deprecated which we don't intend to adjust
- no longer use atriumErrorAdjustor from Reporter but from the
ComponentFactoryContainer in all other places
In order that one is able to exchange a component which is part of
another component, we need to following to change:
- introduce a ComponentFactoryContainer which stores all factories
and provide a way to re-define factories
- add val components to AssertionContainer which returns the specified
ComponentFactoryContainer
- remove withReporter from RootExpectBuilder.OptionsChooser and instead
add a more generic withComponent (and withChainedComponent)
- use AtriumErrorAdjustor not from Reporter (deprecated the property)
but retrieve it from the ComponentFactoryContainer of the
corresponding AssertionContainer
moreover:
- introduce @ExperimentalComponentFactoryContainer
- deprecated the AtriumErrorAdjuster creating functions in CoreFactory
- replace usages accordingly
In detail:
- rename `subject of the assertion` to `subject of `this` expectation`
- rename `@return An [Expect] for the current subject of the assertion.`
to `@return an [Expect] for the subject of `this` expectation.`
this change introduces a binary backward compatibility break because
we expect a different type in the API.
bbc-test fail therefore. Since already the setup fails we need to be
able to forgive also groups and not only tests:
- adjust Spek2ForgivingExecutionListener accordingly
... the Assertion which where announced to be made internal with 1.0.0
moreover:
- deprecate evalOnce in core, not used by Atrium
- adjust BC because we removed deprecated IndentAssertionGroup(Type)