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

add samples for arrayAssertions of api-infix #675

Closed
2 tasks
robstoll opened this issue Oct 27, 2020 · 3 comments · Fixed by #857
Closed
2 tasks

add samples for arrayAssertions of api-infix #675

robstoll opened this issue Oct 27, 2020 · 3 comments · Fixed by #857
Assignees
Labels
Milestone

Comments

@robstoll
Copy link
Owner

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

Code related feature

We also want to provide samples for the infix api

Following the things you need to do:

  • copy ArrayAssertionsSample from fluent-api, adjust imports ...api.fluent... to ...api.infix... and ajdust the samples accordingly (always use the infix syntax, never the fluent).
  • check that the sample in the KDoc Intellij shows looks good (ALT+Mouse-click on function name)

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).
@szatyinadam
Copy link
Collaborator

Can you help me how to use asList with toBe with infix in asListFeature?

@robstoll
Copy link
Owner Author

robstoll commented Apr 1, 2021

Sure, you can use the filler o to turn asList into an infix function:

expect(arrayOf("A", "B")) asList o toBe listOf("A", "B")

I suggest you add the comments the same way as you did in CollectionAssertionSamples and PairAssertionsSamples. Btw. would you mind to add // subject here is back to type List<Int, String> for CollectionAssertionSamples.size as you did in PairAssertionsSamples.first

@szatyinadam
Copy link
Collaborator

Ok, thanks for your explanation. I am working on this and I will put that comment into CollectionAssertionSamples as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants