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

Refactor StringAssert into CharSequenceAssert so StringBuffer and StringBuilder could be used as well #44

Open
Crazyjavahacking opened this issue Jun 5, 2012 · 0 comments

Comments

@Crazyjavahacking
Copy link

I think that FEST assertions could refactor the StringAssert into CharSequenceAssert class. The idea is to support both StringBuilder and StringBuffer in a very natural way, without converting them to String which is less readable.

Internally, the CharSequenceAssert should have exactly the same code as StringAssert, just the conversion from CharSequence to String will be done internally. That means almost no changes in code.

Joes suggested, that we could still have a StringAssert class inheriting from CharSequenceAssert, so that StringAssert is still here and you could have StringBuilder and StringBuffer assertions.

Any other opinions on that change?

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

No branches or pull requests

1 participant