Skip to content

[Issue 154] Refactor PMAccuracy testDataTree method#163

Merged
SergeStinckwich merged 13 commits intomasterfrom
issue-154-refactor-tests
Jan 10, 2020
Merged

[Issue 154] Refactor PMAccuracy testDataTree method#163
SergeStinckwich merged 13 commits intomasterfrom
issue-154-refactor-tests

Conversation

@hemalvarambhia
Copy link
Copy Markdown
Contributor

Issue #154 is proving a little difficult to fix. Therefore I have begun a targeted refactor of the production and test code to help a future developer understand what the Accuracy package does easily.
This PR breaks up the testDataTree code into smaller (hopefully easier to understand) blocks of code.
What is interesting here is that the run message is the generator of the dataTree object. It feels that that is what we are really testing.

The reason I chose to work on the testDataTree message first is that from my earlier spike, I discovered that part of that method fails when I try to get the Accuracy package covered by coveralls.io in the usual way.

@hemalvarambhia hemalvarambhia changed the title Issue 154 refactor tests [Issue 154] Refactor PMAccuracy testDataTree method Dec 27, 2019
@SergeStinckwich SergeStinckwich marked this pull request as ready for review January 10, 2020 08:14
@SergeStinckwich SergeStinckwich merged commit 9ae6495 into master Jan 10, 2020
@SergeStinckwich SergeStinckwich deleted the issue-154-refactor-tests branch January 10, 2020 08:19
SergeStinckwich added a commit that referenced this pull request Jan 25, 2020
* [skip CI]

* [skip CI]

* [skip CI] typos

* [skip CI]

* Update SMark to 1.0.3

* Update README.md

* [Issue 152] Remove Magic From 'initialize' Methods (#153)

* [issue-152] Improved code formatting.

* [issue-152] Removed some reflection magic so that the code is easier to understand.

* [issue-152] Improved code formatting.

* Cleanup to load in PharoGs (#150)

* Do not use an inst variable name as an argument

* Don't use 'p' and 'q' as method temps

They are defined as instance variables in the class. If they are not supposed to modify the instance variable, then they should have different names.

* Don't begin a block with a dot

GemStone isn't happy with empty statements.

* Cleanup of Array constructors

While legal syntax, GemStone has trouble parsing these.

* Don't use instance var name as method argument

* Add spacing to clarify when number ends

GemStone doesn't like '11do:' as a number since 'd' is a legal exponent.

* Spacing to clarify separation of statements

* Fix typo with extra space.

* [issue-154] Corrected the behaviour of findKey to return 'AllTheRest' when selector has no corresponding initialize message. (#155)

* [issue-154] Corrected the behaviour of findKey, making it more testable in the subclass to mitigate risk.

* [issue-154] Promoted the local variables in the test to state variable to remove duplication.

* [issue-154] Extracted duplicate code to a custom assertion.

* [skip CI]

* [skip CI]

* Create FUNDING.yml

* Update FUNDING.yml

* Remove curly braces, replaced with Arrays in most cases, should close #159 (#162)

* Update dependencies to load from github, should close #160 (#161)

* [Issue 154] Refactor PMAccuracy testDataTree method (#163)

* [issue-154] Moved the test method to its own test case class so that we can break up the long test method and understand the message better.

* [issue-154] Moved some test code to an intention-revealing test method & identified a possible smell.

* [issue-154] Moved a block of code to its own intention-revealing test method.

* [issue-154] Moved some test code to its own intention-revealing method.

* [issue-154] Added a smell comment to help the next developer.

* [issue-154] Added more smells to the smell comment.

* [issue-154] Moved the test code to an intention-revealing test method, extracted the expected result to a role-revealing local variable.

* [issue-154] Extracted test code to its own intention-revealing test method, with a comment identifying a coincidence between expected outcome and a default I discovered in the initialize method.

* [issue-154] Added calls to the super class methods as required.

* [issue-154] Put the call to the super class method in the right place.

* [issue-154] Improved the name of the local variable. We still don't know the role it plays in the test yet so gave it a structural name.

* [issue-154] Improved the name of a local variable.

* [issue-154] Moved the test code to its own better named test method.

* Update .travis.yml

* Update appveyor.yml

* Fix some of the red tests for Pharo 8 (#164)

* Update appveyor.yml

* Move from Pharo 7.0 to Pharo 8.0

* Update README.md

Co-authored-by: Hemal Varambhia <[email protected]>
Co-authored-by: James Foster <[email protected]>
Co-authored-by: Julian Maestri <[email protected]>
SergeStinckwich added a commit that referenced this pull request Jan 27, 2020
* Release PolyMath v1.0.2 (#165)

* [skip CI]

* [skip CI]

* [skip CI] typos

* [skip CI]

* Update SMark to 1.0.3

* Update README.md

* [Issue 152] Remove Magic From 'initialize' Methods (#153)

* [issue-152] Improved code formatting.

* [issue-152] Removed some reflection magic so that the code is easier to understand.

* [issue-152] Improved code formatting.

* Cleanup to load in PharoGs (#150)

* Do not use an inst variable name as an argument

* Don't use 'p' and 'q' as method temps

They are defined as instance variables in the class. If they are not supposed to modify the instance variable, then they should have different names.

* Don't begin a block with a dot

GemStone isn't happy with empty statements.

* Cleanup of Array constructors

While legal syntax, GemStone has trouble parsing these.

* Don't use instance var name as method argument

* Add spacing to clarify when number ends

GemStone doesn't like '11do:' as a number since 'd' is a legal exponent.

* Spacing to clarify separation of statements

* Fix typo with extra space.

* [issue-154] Corrected the behaviour of findKey to return 'AllTheRest' when selector has no corresponding initialize message. (#155)

* [issue-154] Corrected the behaviour of findKey, making it more testable in the subclass to mitigate risk.

* [issue-154] Promoted the local variables in the test to state variable to remove duplication.

* [issue-154] Extracted duplicate code to a custom assertion.

* [skip CI]

* [skip CI]

* Create FUNDING.yml

* Update FUNDING.yml

* Remove curly braces, replaced with Arrays in most cases, should close #159 (#162)

* Update dependencies to load from github, should close #160 (#161)

* [Issue 154] Refactor PMAccuracy testDataTree method (#163)

* [issue-154] Moved the test method to its own test case class so that we can break up the long test method and understand the message better.

* [issue-154] Moved some test code to an intention-revealing test method & identified a possible smell.

* [issue-154] Moved a block of code to its own intention-revealing test method.

* [issue-154] Moved some test code to its own intention-revealing method.

* [issue-154] Added a smell comment to help the next developer.

* [issue-154] Added more smells to the smell comment.

* [issue-154] Moved the test code to an intention-revealing test method, extracted the expected result to a role-revealing local variable.

* [issue-154] Extracted test code to its own intention-revealing test method, with a comment identifying a coincidence between expected outcome and a default I discovered in the initialize method.

* [issue-154] Added calls to the super class methods as required.

* [issue-154] Put the call to the super class method in the right place.

* [issue-154] Improved the name of the local variable. We still don't know the role it plays in the test yet so gave it a structural name.

* [issue-154] Improved the name of a local variable.

* [issue-154] Moved the test code to its own better named test method.

* Update .travis.yml

* Update appveyor.yml

* Fix some of the red tests for Pharo 8 (#164)

* Update appveyor.yml

* Move from Pharo 7.0 to Pharo 8.0

* Update README.md

Co-authored-by: Hemal Varambhia <[email protected]>
Co-authored-by: James Foster <[email protected]>
Co-authored-by: Julian Maestri <[email protected]>

* Clean baseline for PM1.0.2 in order to have everything in a same method.

Co-authored-by: Hemal Varambhia <[email protected]>
Co-authored-by: James Foster <[email protected]>
Co-authored-by: Julian Maestri <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants