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

SRP - Captured Output regex #4

Open
jamesladd opened this issue Oct 15, 2015 · 4 comments
Open

SRP - Captured Output regex #4

jamesladd opened this issue Oct 15, 2015 · 4 comments

Comments

@jamesladd
Copy link
Collaborator

The ToyRobotSimulatorTest has methods to help with pattern matching and constructing a Pattern. These don't belong in the Test and should instead be in a separate class similar to how CapturingPrintStream is used. This will make the Test size smaller.

Maybe even have a Matcher that allows you to match with or without a newline and thus remove
additional methods that are about matching from the Test.

@TheSecretSquad
Copy link
Owner

Ok 😺 👍

@TheSecretSquad
Copy link
Owner

@jamesladd Should I write tests for the "matching" code? Seems weird to write tests for something that's used to test, but what guarantees that it's working correctly and not corrupting my tests of the simulation?

Come to think of it. Instead of the CapturingPrintStream having a getter on it for the contents, couldn't I put the matching methods on CapturingPrintStream and have it just verify its own contents?

@jamesladd
Copy link
Collaborator Author

Yes, this is a support class like capturing stream - write a test

Sent from my Commodore 64

On 18 Oct 2015, at 12:35 PM, Pete DiSalvo notifications@github.com wrote:

@jamesladd Should I write tests for the "matching" code? Seems weird to write tests for something that's used to test, but what guarantees that it's working correctly and not corrupting my tests of the simulation?


Reply to this email directly or view it on GitHub.

@TheSecretSquad
Copy link
Owner

@jamesladd Thanks!

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