-
Notifications
You must be signed in to change notification settings - Fork 13
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 Sample rule that copies a sample to a directory for testing #6
Conversation
This commit extracts a JUnit 4 TestRule from the Sample rule present in gradle/gradle and makes it reusable without relying on any Gradle specific classes.
defaultSampleName); | ||
} | ||
|
||
private static SourceSampleDirSupplier eagerSourceSampleDirSupplier(final String sourceBaseDirPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eager doesn't seem to be the right name. How about rootDirSourceSampleDirProvider
?
this(sourceBaseDirPath, temporaryFolder, null); | ||
} | ||
|
||
public Sample(final String sourceBaseDirPath, final TemporaryFolder temporaryFolder, @Nullable String defaultSampleName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we don't expose a long/many constructors but some builder like methods instead? This way we can keep the API stable/extendable and the class is easier to use.
@wolfs PTAL! |
8f7f9bf
to
0799d53
Compare
@eriwen Would you like to take a look and potentially merge this PR? |
This PR extracts a JUnit 4 TestRule from the Sample rule present in gradle/gradle and makes it reusable without relying on any Gradle specific classes.