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

Replace MatcherAssert.assertThat with 'new Assertion<>' #18

Closed
llorllale opened this issue May 30, 2018 · 26 comments
Closed

Replace MatcherAssert.assertThat with 'new Assertion<>' #18

llorllale opened this issue May 30, 2018 · 26 comments
Labels
enhancement New feature or request scope
Milestone

Comments

@llorllale
Copy link
Owner

llorllale commented May 30, 2018

Let's add a substitute for MatcherAssert.assertThat, something like Assertion<T>:

new Assertion<>(
    "Collection cannot be empty",
    collection.size(),
    new IsNot<>(0)
).verify();    //might throw AssertionError

Note: ctor must have the reason text parameter

@llorllale
Copy link
Owner Author

@0crat in

@llorllale llorllale changed the title MatcherAssert.assertThat Replace MatcherAssert.assertThat with 'new Assertion<>' May 30, 2018
@llorllale llorllale added the enhancement New feature or request label May 30, 2018
@0crat
Copy link
Collaborator

0crat commented May 30, 2018

@0crat in (here)

@llorllale Job #18 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented May 30, 2018

Bug was reported, see §29: +15 point(s) just awarded to @llorllale/z

@llorllale
Copy link
Owner Author

@llorllale let's make Assertion accept a Scalar of the result to be tested. This way, we can also use it to assert on exceptions.

It would thus look like this for normal execution flow:

new Assertion<>(
    "Collection cannot be empty",
    () -> collection.size(),
    new IsNot<>(0)
).verify();    //might throw AssertionError

To test for exceptions, one would perhaps just provide a matcher for the exception:

new Assertion<>(
    "Collection cannot be empty",
    () -> collection.size(),
    new Throws(IllegalArgumentException.class, "Illegal size")  // exception matcher
).verify();    //might throw AssertionError

See ##40 (comment)

@llorllale
Copy link
Owner Author

@0crat assign me

llorllale added a commit that referenced this issue Dec 8, 2018
* Added `Assertion`
* `Throws` now declares a generic parameter in order to be compatible
  with `Assertion`
* Left puzzle to refactor existing tests with `Assertion`
* Left puzzle to continue refining `Assertion`
@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

@0crat assign me (here)

@llorllale @llorllale/z not enough funds available in the project, can't set budget of job #18, see §21; @llorllale/z will get no money on completion; in order to fix that, add funds to the project and assign the job again

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

Manual assignment of issues is discouraged, see §19: -5 point(s) just awarded to @llorllale/z

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

It is strongly discouraged to assign jobs to their creators, see §19: -15 point(s) just awarded to @llorllale/z

llorllale added a commit that referenced this issue Dec 8, 2018
* Added `Assertion`
* `Throws` now declares a generic parameter in order to be compatible
  with `Assertion`
* Left puzzle to refactor existing tests with `Assertion`
* Left puzzle to continue refining `Assertion`
llorllale added a commit that referenced this issue Dec 8, 2018
* Added `Assertion`
* `Throws` now declares a generic parameter in order to be compatible
  with `Assertion`
* Left puzzle to refactor existing tests with `Assertion`
* Left puzzle to continue refining `Assertion`
@llorllale llorllale added this to the 1.0.0 milestone Dec 8, 2018
@0pdd
Copy link
Collaborator

0pdd commented Dec 8, 2018

@llorllale 2 puzzles #52, #53 are still not solved.

@llorllale
Copy link
Owner Author

@llorllale Assertion implemented in PR #49

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

Job #18 is not in the agenda of @llorllale/z, can't retrieve data and time of add

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

Job was finished in 2 hours, bonus for fast delivery is possible (see §36)

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

The job #18 is now out of scope

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

Order was finished: +35 point(s) just awarded to @llorllale/z

@0pdd
Copy link
Collaborator

0pdd commented Jan 16, 2019

@llorllale 3 puzzles #53, #80, #81 are still not solved; solved: #52.

@llorllale
Copy link
Owner Author

@rultor release, tag is 0.13

@rultor
Copy link
Collaborator

rultor commented Jan 18, 2019

@rultor release, tag is 0.13

@llorllale OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Jan 18, 2019

@rultor release, tag is 0.13

@llorllale Done! FYI, the full log is here (took me 19min)

@0pdd
Copy link
Collaborator

0pdd commented Jan 19, 2019

@llorllale 3 puzzles #53, #80, #84 are still not solved; solved: #52, #81.

@0pdd
Copy link
Collaborator

0pdd commented Jan 22, 2019

@llorllale 4 puzzles #52, #80, #84, #88 are still not solved; solved: #53, #81.

@0pdd
Copy link
Collaborator

0pdd commented Feb 2, 2019

@llorllale 3 puzzles #52, #88, #99 are still not solved; solved: #53, #80, #81, #84.

@0pdd
Copy link
Collaborator

0pdd commented Feb 26, 2019

@llorllale 2 puzzles #52, #88 are still not solved; solved: #53, #80, #81, #84, #99.

@0pdd
Copy link
Collaborator

0pdd commented Apr 21, 2019

@llorllale 2 puzzles #110, #52 are still not solved; solved: #53, #80, #81, #84, #88, #99.

@0pdd
Copy link
Collaborator

0pdd commented Apr 24, 2019

@llorllale 2 puzzles #113, #52 are still not solved; solved: #110, #53, #80, #81, #84, #88, #99.

@0pdd
Copy link
Collaborator

0pdd commented Apr 26, 2019

@llorllale 2 puzzles #116, #52 are still not solved; solved: #110, #113, #53, #80, #81, #84, #88, #99.

@0pdd
Copy link
Collaborator

0pdd commented Apr 26, 2019

@llorllale the puzzle #52 is still not solved; solved: #110, #113, #116, #53, #80, #81, #84, #88, #99.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope
Projects
None yet
Development

No branches or pull requests

4 participants