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

rename withFailureHint to withHelpOnFailure #671

Closed
2 tasks
robstoll opened this issue Oct 26, 2020 · 14 comments · Fixed by #970
Closed
2 tasks

rename withFailureHint to withHelpOnFailure #671

robstoll opened this issue Oct 26, 2020 · 14 comments · Fixed by #970
Assignees
Milestone

Comments

@robstoll
Copy link
Owner

Platform (all, jvm, js, android): all
Extension (none, kotlin 1.3): none

Code related feature

Currently one can create hints in case of an assertion failure by using withFailureHint. In robstoll/atrium-roadmap#9 we came to the conclusion that withHelpOnFailure would better state the intend.

Following the things you need to do:

logic

  • find everything containing with...FailureHint, duplicate and rename to withHelpOn...Failure
  • deprecate everything you find containing FailureHint and point to the new functionality, i.e add a @Deprecated("Use ...; will be removed with 1.0.0") and replace ... accordingly.

API
there shouldn't be any change in the APIs

Your first contribution?

  • Write a comment I'll work on this if you would like to take this issue over.
    This way we get the chance to revise the description in case things have changed in the meantime, we might give you additional hints and we can assign the task to you, so that others do not start as well.
  • See Your first code contribution for guidelines.
  • Do not hesitate to ask questions here or to contact us via Atrium's slack channel if you need help
    (Invite yourself in case you do not have an account yet).
@rishujam
Copy link

I'll work on this

@rishujam
Copy link

@robstoll I am new to Open source. I have one query do I need to open each and every file in this project and check if it contains withFailureHint method and then refactor it or is there any other way I need to proceed.

@robstoll
Copy link
Owner Author

Upfront, it's up to you how you do it. I think your approach is good but better search for with.*FailureHint using regex
image

@rishujam
Copy link

@robstoll I am not able to do that sorry

@rishujam rishujam removed their assignment Apr 19, 2021
@robstoll
Copy link
Owner Author

@rishujam no worries. Let me know in case you would still like to do it but need more help.

@offgridauthor
Copy link

I'd like to work on this issue.

@DurveshKumarPal
Copy link

hey, can you assign me that issue.

@robstoll
Copy link
Owner Author

robstoll commented Jun 6, 2021

@offgridauthor are you still working on this one? @DurveshKumarPal would like to take over

@robstoll
Copy link
Owner Author

robstoll commented Jun 7, 2021

@DurveshKumarPal there are also other issues where we could use your help and are not assigned yet in case you already want to start programming:
https://github.com/robstoll/atrium/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22

@offgridauthor
Copy link

@offgridauthor are you still working on this one? @DurveshKumarPal would like to take over

Go for it. Things have shifted and I won't be able to tackle this right now.

@stevenlmcgraw
Copy link
Contributor

stevenlmcgraw commented Aug 21, 2021

I'll work on this. I am familiarizing myself with Atrium still, but I think I get the idea. I will let you know when I have questions - thanks for the chance to let me get my feet wet with contributing!

stevenlmcgraw added a commit to stevenlmcgraw/atrium that referenced this issue Aug 27, 2021
…robstoll#671

Update `assertions/builders/descriptiveWithFailureHint.kt`:

	- Add `withHelpOnFailure` and mark `withFailureHint` as deprecated
	- Add `withHelpOnFailureBasedOnSubject` and mark `withFailureHintBasedOnSubject` as deprecated
	- Add `withHelpOnFailureBasedOnDefinedSubject` and mark `withFailureHintBasedOnDefinedSubject` as deprecated

Update `atrium/logic/creating/filesystem/hints/hints.kt`:

	- Add `withHelpOnIOExceptionFailure` and mark `withIOExceptionFailureHint` as deprecated
	- Add `withHelpOnFileAttributesFailure` and mark `withFileAttributesFailureHint` as deprecated

Refactor all usages of `with*FailureHint` found to favor the `withHelpOn*Failure` version

Update `assertions/builders/DescriptiveWithBasedOnSubjectSpec.kt`:

	- Refactor text referencing deprecated methods

Update `atrium/logic/impl/DefaultFloatingPointAssertions.kt`:

	- Remove unused import for deprecated `with*FailureHint` method(s)

Update	`atrium/logic/impl/DefaultBigDecimalAssertions.kt`:

	- Remove unused import for deprecated `with*FailureHint` method(s)

Update	`atrium/logic/impl/DefaultPathAssertions.kt`:

	- Remove unused import for deprecated `with*FailureHint` method(s)
@stevenlmcgraw
Copy link
Contributor

Hey @robstoll - let me know if this commit aligns with what the ask is on this one.

Thanks in advance.

@robstoll
Copy link
Owner Author

@stevenlmcgraw can you please create a draft PR, it's way easier go give feedback this way

@stevenlmcgraw
Copy link
Contributor

@robstoll the draft pull request has been issued.

@robstoll robstoll linked a pull request Aug 30, 2021 that will close this issue
@robstoll robstoll added this to the 0.17.0 milestone Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants