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

[Proposal] add be function to BeEqual interface #12

Closed
sergeibukharov opened this issue Jan 13, 2020 · 1 comment
Closed

[Proposal] add be function to BeEqual interface #12

sergeibukharov opened this issue Jan 13, 2020 · 1 comment

Comments

@sergeibukharov
Copy link
Collaborator

In order to maintain fluent DSL, I suggest adding be function to BeEqual interface.

true.should() be true
"Hello".should() be "Hello"

interface BeEqual<T, R : BeEqual<T, R>> {

infix fun be(expected: T): R = beEqual()

}

As a counterpart we may add notBe

"Hello".should() notBe "World"
@torczuk
Copy link
Contributor

torczuk commented Jan 13, 2020

Do you suggest be to be an alias for beEqual or rename beEqual to be?

sergeibukharov added a commit that referenced this issue Jan 16, 2020
Just to allow use more native DSL.
torczuk added a commit that referenced this issue Jan 16, 2020
#12 add be and notBe to BeEqual interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants