-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Kotlin to list of languages, refresh assignment.
- Loading branch information
Showing
5 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test Kotlin | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'Kotlin/**' | ||
- '.github/workflows/Kotlin.yml' | ||
pull_request: | ||
paths: | ||
- 'Kotlin/**' | ||
- '.github/workflows/Kotlin.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DB_USER: root | ||
DB_OLD_PASSWORD: root | ||
DB_PASSWORD: mysql | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Start MYSQL and import DB | ||
run: | | ||
sudo systemctl start mysql | ||
mysqladmin --user=${{ env.DB_USER }} --password=${{ env.DB_OLD_PASSWORD }} password ${{ env.DB_PASSWORD }} | ||
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < ${GITHUB_WORKSPACE}/build/Database/initDatabase.sql | ||
- name: Set up Kotlin | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 8 | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Build and test | ||
working-directory: Kotlin | ||
run: ./gradlew --console=plain --info --stacktrace build test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Dependency Breaking Katas | ||
|
||
Exercises to practice breaking dependencies in legacy | ||
code to create tests for it. | ||
|
||
## Goal | ||
|
||
We have some legacy code. We need to make changes. | ||
To make changes we need to introduce tests first. | ||
We might have to change some code to enable testing. | ||
We need to introduce so-called Seams (see [Michael | ||
Feathers' Working Effectively with Legacy | ||
Code](https://www.goodreads.com/book/show/44919.Working_Effectively_with_Legacy_Code)). | ||
|
||
Changing code without test is risky, so we want to | ||
|
||
* Only change as little code as possible. | ||
* Rely on automated Refactoring tools as much as possible. | ||
* You must not change the public API of the class. | ||
|
||
### Assignments for Techniques | ||
|
||
* Parametrise Constructor | ||
* Subclass And Override Method | ||
* Extract And Override Call | ||
* Replace Global Reference With Getter | ||
* Extract And Override Factory Method | ||
|
||
Planned | ||
|
||
* Extract Interface | ||
* Adapt Parameter | ||
|
||
### Task | ||
|
||
Each task presents you with a class and some collaborators. | ||
|
||
* Bring this class under test. Make sure to cover all paths in the core logic. | ||
* There is an existing test class with a first test case which might or might not work. | ||
* You cannot change collaborators because they are used by other teams as well. | ||
|
||
### License | ||
|
||
[New BSD License](http://opensource.org/licenses/bsd-license.php), see `license.txt` in repository. | ||
|
||
(This is a copied document - do not edit!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,10 @@ cd .. | |
|
||
|
||
|
||
cd Kotlin | ||
call gradlew clean | ||
cd .. | ||
|
||
|
||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters