-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi,
Before opening PRs I'd like to discuss a possible improvement in your library: instantiating an ExpectedLogging from a package name in addition to a class. The idea behind this is that (in my case) some of the generated logs are business requirements, that's why I'm asserting them in unit tests. It doesn't really matter which class outputs the log, as long as the log is present then my business requirement is met. Also, refactorings might move a logged message from one class to another, and in my opinion that shouldn't affect tests.
So what I'm proposing is something like this:
public static ExpectedLogging forPackage(String packageName) {
return new ExpectedLogging(packageName);
}Or maybe even a more general:
public static ExpectedLogging forLogger(String loggerName) {
return new ExpectedLogging(loggerName);
}Or perhaps just making the existing constructor public?
Metadata
Metadata
Assignees
Labels
No labels