Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
isidore committed Sep 14, 2023
1 parent 46acb2d commit 6677461
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
# ApprovalTests.java.StarterProject
# Refactoring Early Returns

[![Build Status](../../workflows/build/badge.svg?branch=main)](../../actions?query=build%3Amain)


This is a starter project for:
2 Practice Exercises for Refactoring Early Returns in Java.

* ApprovalTests in java - see [ApprovalTests.java](https://github.com/approvals/ApprovalTests.java)
* Junit
* Maven

Works on Mac, Linux and Windows.

Feel free to copy and go...

## Starting Point

The tests in [SampleTests](https://github.com/approvals/ApprovalTests.java.StarterProject/blob/master/src/test/java/org/samples/SampleTests.java) should pass, and then you should delete/modify as needed to get started.


Notes:

* For more information, see the [ApprovalTests.java User Guide](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/docs/README.md#top)
* You will need a Diff tool.
* Suggestions:
* Mac: [DiffMerge](https://sourcegear.com/diffmerge/)
* Windows: [WinMerge](winmerge.org/)
* Linux: [meld](http://meldmerge.org/)
# Steps for refactoring
1. Add nullable return
1. set value
1. if != null return
1. move if
1. add else
1. invert if
1. repeat until all returns are at the end
1. clean up


0 comments on commit 6677461

Please sign in to comment.