Skip to content

Instantly share code, notes, and snippets.

@drawers
Created September 24, 2023 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drawers/882c4eeac0180afccc8822017073574e to your computer and use it in GitHub Desktop.
Save drawers/882c4eeac0180afccc8822017073574e to your computer and use it in GitHub Desktop.
TestableHtml refactor from Clean Code
private void includeSetupAndTeardownPages() throws Exception {
includeSetupPages();
includePageContent();
includeTeardownPages();
updatePageContent();
}
private void includeSetupPages() throws Exception {
if (isSuite)
includeSuiteSetupPage();
includeSetupPage();
}
private void includeSuiteSetupPage() throws Exception {
include(SuiteResponder.SUITE_SETUP_NAME, "-setup");
}
private void includeSetupPage() throws Exception {
include("SetUp", "-setup");
}
private void includePageContent() throws Exception {
newPageContent.append(pageData.getContent());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment