314 Commits

Author SHA1 Message Date
Robert Stoll
f6375b1ca9 #292 show only failing for inOrder.only if more than 10 elements
I decided that I will apply a default heuristic so that (I hope) most
users don't have to change reporting options.
2021-07-12 22:33:31 +02:00
Robert Stoll
2275e64159 rename notToContainDuplicates to toHaveElementsAndNoDuplicates
because we actually check if the Iterable has a next element and thus
it is better to be more explicit in naming.
2021-07-10 14:52:13 +02:00
Edward Hou
1a8e024a7b Make Iterable.all and Iterable.containsNoDuplicates use hasNext (#939) 2021-07-06 20:37:40 +02:00
Robert Stoll
ee9f26a5c6 rename resultAssertion functions to new schema in api-fluent 2021-07-05 21:17:36 +02:00
Edward Hou
dac885bc6e More consise reporting for contains.atLeast(1) (#934) 2021-06-11 07:53:05 +02:00
Edward Hou
91fad2624c Make notToContain less verbose and show mismatched indices (#931) 2021-06-09 09:16:57 +02:00
Robert Stoll
f67cd01e38 rename appendAssertion/CreatedBy to append and appendAsGroup
This way we can use it also on ProofContainer and users won't notice
anything as long as they recompile
2021-05-29 21:22:55 +02:00
Robert Stoll
f4af95da17 deprecate pathAssertions, use new ...Expectations in api-fluent 2021-05-22 23:23:07 +02:00
Ed
908110dd3b Improve reporting on containsNoDuplicates by tracking duplicate indices 2021-05-22 21:34:09 +02:00
Robert Stoll
d4c3bd7ab2 rename optionalAssertion functions to new schema in api-fluent 2021-05-21 22:42:46 +02:00
Robert Stoll
187ad268fb deprecate chronoZonedDateTimeAssertions, use new ...Expectations in api-fluent 2021-05-21 22:01:22 +02:00
Robert Stoll
9478e90b48 rename chronoZonedlDateTimeAssertion functions to new schema in api-fluent 2021-05-21 22:01:21 +02:00
Robert Stoll
99b4169268 rename chronoLocalDateTimeAssertion functions to new schema in api-infix 2021-05-21 22:01:21 +02:00
Robert Stoll
7f104c5d18 rename chronoLocalDateTimeAssertion functions to new schema in api-fluent 2021-05-21 22:01:20 +02:00
Robert Stoll
53de3023e4 rename chronoLocalDateAssertion functions to new schema in api-fluent 2021-05-21 21:09:48 +02:00
Robert Stoll
09a58537ff rename bigDecimalAssertion functions to new schema in api-fluent 2021-05-20 22:38:37 +02:00
Robert Stoll
5608af1852 deprecate throwableAssertions, use new ...Expectations in api-fluent 2021-05-20 21:52:23 +02:00
Robert Stoll
29e4c79fb7 rename throwableAssertion functions to new schema in api-fluent 2021-05-20 21:23:33 +02:00
Robert Stoll
7222026a84 deprecate mapEntryAssertions, use new ...Expectations in api-fluent 2021-05-19 18:09:39 +02:00
Robert Stoll
2e0e25d2ab rename mapEntryAssertion functions to new schema in api-fluent 2021-05-19 12:45:13 +02:00
Robert Stoll
9161337adc rename map assertion functions to new schema in api-fluent 2021-05-18 13:58:53 +02:00
Robert Stoll
439d4ee13c rename toHaveNext to toHaveElements
same same notToHaveNext as well as for toHaveNextAndAll/Any/None
2021-05-04 22:36:24 +02:00
Robert Stoll
d67ff96388 rename iterable assertion functions to new schema in api-infix
cannot rename all files because of git mv incapabilities. Would loose
history otherwise.
2021-04-28 21:26:00 +02:00
Robert Stoll
37b4e8144f deprecate iterableAssertions, use mew ...Expectations in api-fluent 2021-04-28 21:26:00 +02:00
Robert Stoll
e57c7bccbd rename iterable assertion functions to new schema in api-fluent
cannot rename all files because of git mv incapabilities. Would loose
history otherwise.
2021-04-28 21:20:33 +02:00
Robert Stoll
25f8b07c35 deprecate floatingPointAssertions, use mew ...Expectations in api-fluent
moreover:
- also change description in reporting from `to be` to `to equal`
- don't provide a replacement for BigDecimal, it is a smell if someone
  uses it.
2021-04-25 19:35:08 +02:00
Robert Stoll
85b5725ef4 rename floating point assertion functions to new schema in api-fluent 2021-04-25 00:21:49 +02:00
Robert Stoll
44cd5e05b3 add notToBeGreaterThan and notToBeLessThan
moreover:
- make the distiction between toEqual and toBeEqualComparingTo clearer
- rewrite ComparableExpectationsSpec to new nameing and include test
  cases for toBeLessThanOrEqualTo and toBeGreaterThanOrEqualTo where
  the equals/compareTo contract is broken
2021-04-24 23:04:18 +02:00
Robert Stoll
6c0095d738 rename toBeLess/GreaterThanOrEqual to ...OrEqualTo 2021-04-23 22:50:18 +02:00
Robert Stoll
2b8a27535c deprecate comparableAssertions, use mew ...Expectations in api-fluent 2021-04-21 21:39:38 +02:00
Robert Stoll
adb895091c deprecate collectionAssertions, use mew ...Expectations in api-fluent 2021-04-20 22:01:24 +02:00
Robert Stoll
b1b01645a2 deprecate charSequenceAssertions, use mew ...Expectations in api-fluent
moreover:
- do no longer provide an overload for Char for toStartWith and
  toEndsWith. I prefer to have less API methods and less maintenance
  compared to a nice to have. Which also means I prefer to force users
  to write "a" over 'a' than more maintenance, more API methods
2021-04-15 23:14:47 +02:00
Robert Stoll
91274416c7 rename charSequence assertion functions to new schema in api-fluent
some additional renaming:
- mismatches to notToMatch

moreover:
- forgive bc/bbc which check that contains functions point to
  containsNot under some circumstances because containsNot is now named
  notToContain
2021-04-15 22:54:22 +02:00
Robert Stoll
1fea83a62b deprecate expectation verb assert and assertThat 2021-04-14 21:33:18 +02:00
Robert Stoll
30cbe303e0 rename toBeA to toBeAnInstanceOf in both APIs 2021-04-13 21:19:31 +02:00
Robert Stoll
fdcbc1ab2a deprecate old anyAssertions and use new anyExpectations in api-infix 2021-04-12 22:41:33 +02:00
Robert Stoll
b81729506b deprecate old anyAssertions and use new anyExpectations in api-fluent 2021-04-12 22:41:32 +02:00
Robert Stoll
5f0de8b973 rename any assertion functions to new schema in api-fluent
some additional renaming:
- is(Not)SameAs to (not)ToBeTheInstance
- isNoneOf to notToEqualOneOf
- isNotIn to notToEqualOneIn
2021-04-12 22:41:32 +02:00
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
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
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
6571239140 introduce its as convenience feature extractor function 2021-03-18 21:19:06 +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