Closed DanielJette closed 2 years ago
cc @lwise
I no longer like this approach. It exposes too many internal state variables through that interface, unintentionally making them visible to the consumer (test) classes. I'd like to split this up so that the internal state variables are not exposed publicly
What does this change accomplish?
This is the first of many PRs to break down the monolithic
ScreenshotRule
into a collection of composable, reusable and extensible elements. The ultimate goal is to allow Testify to interoperate with a wider variety of testing methodologies such as JUnit5 and Test Scenarios.How have you achieved it?
In this PR, I have collected all of the configuration related properties from
ScreenshotRule
and extracted them to a new interface,ScreenshotConfigurationInterface
. I have then employed the delegation pattern to composeScreenshotRule
fromScreenshotConfiguration
. The primary outcome from this change is to reduce the size of theScreenshotRule
class and begin the process of more narrowly defining the role and purpose of each aspect of the class. Eventually, all ofScreenshotRule
will be replaced with reusable, composable objects.Tophat instructions
There are no expected changes to the public API in this PR. All tests should pass without modification.
Notice
This change must keep
main
in a shippable state; it may be shipped without further notice.