Commit Graph

744 Commits

Author SHA1 Message Date
Robert Stoll
c2a1942c5c rename core-api to core
and use `expectation` in packages.md instead of `assertion`
2021-04-06 21:06:11 +02:00
Robert Stoll
924106a968 remove RawString and sub types 2021-04-05 21:24:21 +02:00
Robert Stoll
81216138ec deprecate CoreFactory and loadService 2021-04-05 21:24:20 +02:00
Robert Stoll
180e0cceab update TODOs which we do no longer plan for 0.17.0 2021-04-04 23:16:23 +02:00
Robert Stoll
8210983143 remove deprecated Reporter.atriumErrorAdjuster 2021-04-04 23:04:21 +02:00
Robert Stoll
c0b3b77282 adjust fixSrc for bc, needs to be per target
We don't apply the fix if only for the last target in case we already
have the sources of this target but want to apply the fix to another.
2021-04-04 22:28:44 +02:00
Robert Stoll
144d35c167 replace SubjectProvider with Expect but do not yet remove
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
2021-04-04 21:32:58 +02:00
Robert Stoll
91a36a93fb remove StaticName and description in Feature/FeatureWithCreator 2021-04-04 21:32:57 +02:00
Robert Stoll
2519afb254 remove deprecated modules, ReportFactory, ExpectBuilder and dependOnMe
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.
2021-04-01 22:57:33 +02:00
Robert Stoll
cf8de1de91 setup bbc/bc tests for 0.16.0 2021-03-31 21:51:35 +02:00
Robert Stoll
cf3ef3c5ce remove dependency to core-robstoll-common in verbs-internal 2021-03-30 13:57:56 +02:00
Robert Stoll
342ed253a7 update packges.md and add missing KDoc 2021-03-30 13:57:55 +02:00
Robert Stoll
bd25186c53 move MetaFeature to logic and MetaFeatureOption to APIs 2021-03-21 22:45:03 +01:00
Robert Stoll
6571239140 introduce its as convenience feature extractor function 2021-03-18 21:19:06 +01:00
Robert Stoll
30f812e1a6 deprecate ReporterFactory and property reporter 2021-03-16 23:06:59 +01:00
Robert Stoll
74f111b826 move TODOs to 0.17.0 which we no longer plan for 0.16.0 2021-03-16 22:03:30 +01:00
Robert Stoll
675fc02c33 fix typo lineSeparator instead of lineSeperator 2021-03-16 21:32:39 +01:00
Robert Stoll
4103508d1b sort entries for isEmptyDirectory 2021-03-16 21:09:40 +01:00
Robert Stoll
206500bec0 show max 10 dir entries (with ellipsis) for isEmptyDirectory
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
-
2021-03-16 13:43:24 +01:00
Mai
aed87e4a9b add isEmptyDirectory (#831)
* add isEmptyDirectory to PathAssertions.kt and implemented it.
* add infix samples.
* add fluent samples.
2021-03-16 13:08:57 +01:00
Robert Stoll
27b3e4a4a0 fix readme re-generation, use always ReadmeObjectFormatter
moreover:
- fix the broken link for mapArguments snippet
- let TextObjectFormatterCommon extend TextObjectFormatter
2021-02-23 21:49:06 +01:00
Robert Stoll
575f5285e1 use Translator in ComponentFactoryContainer introduce ComponentFactory
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
2021-02-23 15:49:36 +01:00
Robert Stoll
d010e5af67 write specs to cover custom bullet points, remove from other specs 2021-02-23 15:49:35 +01:00
jaime
2d3b1c898a add convenience shortcut for Path.toBeASymbolicLink feature
For both infix and fluent API styles
2021-02-20 19:11:03 +01:00
Robert Stoll
96e7587684 fix wrong ReplaceWith imports for assertion verbs 2021-02-18 16:27:47 +01:00
Ihar
ab9fcb4344 Move PathFeatureExpectationsSpec to PathExpectationsSpec 2021-02-17 12:49:19 +03:00
Robert Stoll
6db344764d Merge pull request #768 from ivanmiklec/remove-size-check-out-of-iterable-contains
Remove size check feature assertion from iterable contains
2021-02-16 22:24:39 +01:00
ivanmiklec
88fd0f114a #299 move size feature assertion from iterable.contains 2021-02-16 01:12:36 +01:00
Igor Emelyanov
56afad808f #636 improve perfomance filter duplicates (#812) 2021-02-15 21:21:17 +01:00
Robert Stoll
09c27e3625 move PleaseUseReplacementException to core
i.e.:
- duplicate and deprecate the one in domain-builders
- ignore failing bbc and bc tests
2021-02-12 20:57:48 +01:00
Robert Stoll
c8e8e11dd5 replace AssertionCollector by utility functions in logic
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
2021-02-08 23:50:46 +01:00
Robert Stoll
241d41a825 introduce ComponentFactoryContainer and AtriumErrorAdjusters in core
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
2021-02-08 23:50:46 +01:00
Robert Stoll
9ae00123d6 move away from jcenter as it will stop working on 1st of may 2021 2021-02-07 20:19:02 +01:00
Robert Stoll
fdb357c02a deprecate ExpectBuilder and introduce RootExpectBuilder in logic 2021-01-25 21:55:18 +01:00
Robert Stoll
c417262554 rename assertion to expectation in KDoc
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.`
2021-01-19 20:30:36 +01:00
Robert Stoll
61c88ec1a6 split up forgive pattern for bc and bbc and forgive samples 2021-01-17 22:48:05 +01:00
Robert Stoll
ed0d31e47e change will be removed with 1.0.0 to latest with 1.0.0 2021-01-16 21:50:20 +01:00
Robert Stoll
a93f78adcf move Group and co. from domain-builders to logic use it in API
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
2021-01-16 21:27:24 +01:00
Robert Stoll
9012ff6dd5 move VarArgHelper from domain to logic
and make constructor of ArgumentMapperBuilder internal
2021-01-14 21:36:44 +01:00
Robert Stoll
7f2b38f5c6 also run samples in bbc-tests 2021-01-13 00:15:52 +01:00
Robert Stoll
63155eed45 re-establish bbcTests, re-add StaticName (due to setup)
forgive more specs due to bbc
2021-01-12 23:29:49 +01:00
Joshua Gleitze
45b69cd53f refactor: rename and adapt specs from *Assertions* to *Expectations* 2021-01-10 22:29:12 +01:00
Robert Stoll
7145b8292b report has not: duplicate elements for containsNoDuplicateElements 2021-01-10 21:33:30 +01:00
Robert Stoll
aa319e34f4 remove deprecated stuff of Assertions in core and make internal...
... 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)
2021-01-09 22:59:48 +01:00
Robert Stoll
f72e89ea2e copy and move AssertionCollector to logic, deprecate the one in domain
For this to work, we need to pass AssertionContainer around in order
that we can use the implementation configured there.
2021-01-09 22:26:48 +01:00
Robert Stoll
b2ac85d5e9 mention how to include bc-tests in project and build also samples for bc 2021-01-09 00:32:13 +01:00
Robert Stoll
3db8cbea93 re-add jacoco coverage to bc and bbc tests
and fix dependency to translations for infix, should also use de_CH in
bc-tests
2021-01-08 23:36:26 +01:00
Robert Stoll
d1fa52871e move bbc tests into bc-tests, remove bc-test
moreover:
- rename TestEngine id from spek2-deprecation to spek2-forgiving
2021-01-08 21:25:29 +01:00
Robert Stoll
5513cbec0f re-enable bc-tests for 0.15.0, don't use KeyWithValueCreator in spec
use the helper function `keyValue` instead
2021-01-08 16:54:14 +01:00
Robert Stoll
72b57abec9 fix bc for 0.14.0, re-add contains all for infix
moreover:
- rename StaticName to StaticNames
  - don't use it anymore in tests as this causes troubles in bc-tests
- remove specs in 0.14.0 about AssertionPlant and co.
2021-01-08 16:54:13 +01:00