Skip to content

Commit c276040

Browse files
authored
Merge branch 'code-differently:main' into main
2 parents 7d10b07 + d35d0dd commit c276040

File tree

14 files changed

+612
-1
lines changed

14 files changed

+612
-1
lines changed

lesson_15/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,18 @@ Please review the following resources before lecture:
99

1010
## Homework
1111

12-
- TODO(anthonydmays): Add details here.
12+
- [ ] Complete [Unit Testing](#unit-testing) assignment.
13+
- [ ] Do pre-work for [lesson 16](/lesson_16/).
14+
15+
### Unit Testing
16+
17+
For the code in the Lesson 15 app, you will write tests in the [unit tests project][unit-tests-link]. You must achieve a code coverage of 80% or more. The coverage report can be viewed at [./tdd/tdd_app/build/reports/jacoco/test/html/index.html][coverage-report] after running `./gradlew check` or `./gradlew jacocoTestReport`.
18+
19+
In addition to writing unit tests, you will need to implement a new method on the `Employee` class called `getDetails` that returns a string describing the employee using the Test-Driven Development methodology.
20+
21+
### Stretch assignment
22+
23+
For this stretch assignment, you will create a unique folder and copy the lesson 10 `libraries` app typescript project to it. Then, create integration tests for the `MediaCollectionApp` that ensures it can load CSV data using a specific loader. Also configure a code coverage framework and ensure that code coverage is at least 70% is achieved for the whole app. Lastly, add a script to the `package.json` that allows for running the integration tests separately from the main unit tests.
24+
25+
[coverage-report]: ./tdd/tdd_app/build/reports/jacoco/test/html/index.html
26+
[unit-tests-link]: ./tdd/tdd_app/src/test/java/com/codedifferently/lesson15/

lesson_15/tdd/.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# Linux start script should use lf
5+
/gradlew text eol=lf
6+
7+
# These are Windows script files and should use crlf
8+
*.bat text eol=crlf
9+

lesson_15/tdd/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

lesson_15/tdd/gradlew

Lines changed: 252 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lesson_15/tdd/gradlew.bat

Lines changed: 94 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)