Skip to content

Commit

Permalink
deploy: 1d86db2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonajo committed Feb 27, 2024
1 parent 90d2a89 commit 6902bf3
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/index.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docs on PRC2</title><link>https://fontysvenlo.github.io/prc2/docs/</link><description>Recent content in Docs on PRC2</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 01 Feb 2022 11:32:04 +0100</lastBuildDate><atom:link href="https://fontysvenlo.github.io/prc2/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>01 Unit Testing Basics</title><link>https://fontysvenlo.github.io/prc2/docs/unit-testing-basics/</link><pubDate>Tue, 01 Feb 2022 11:32:04 +0100</pubDate><guid>https://fontysvenlo.github.io/prc2/docs/unit-testing-basics/</guid><description>Table of ContentsWrite your own tests!Testing / Test Driven DevelopmentWhat are tests and why do we need them?Test Driven Development (TDD)Arrange Act AssertClues neededAssertJ examples.Simple TestsString ContainmentCollection ContainmentAssert ExceptionsSoft AssertionsAssumptionsAdditional pointersWrite your own tests!Throughout the exercises of PRC1, you have become acquainted with the value of tests: You have a way of checking if your code is any good without having to test each and every part manually. You clicked on the nice TMC button in NetBeans and then you could see which parts of your code worked, and which didn’t.</description></item></channel></rss>
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docs on PRC2</title><link>https://fontysvenlo.github.io/prc2/docs/</link><description>Recent content in Docs on PRC2</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 01 Feb 2022 14:17:33 +0100</lastBuildDate><atom:link href="https://fontysvenlo.github.io/prc2/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>01 Unit Testing Basics</title><link>https://fontysvenlo.github.io/prc2/docs/unit-testing-basics/</link><pubDate>Tue, 01 Feb 2022 11:32:04 +0100</pubDate><guid>https://fontysvenlo.github.io/prc2/docs/unit-testing-basics/</guid><description>Table of ContentsWrite your own tests!Testing / Test Driven DevelopmentWhat are tests and why do we need them?Test Driven Development (TDD)Arrange Act AssertClues neededAssertJ examples.Simple TestsString ContainmentCollection ContainmentAssert ExceptionsSoft AssertionsAssumptionsAdditional pointersWrite your own tests!Throughout the exercises of PRC1, you have become acquainted with the value of tests: You have a way of checking if your code is any good without having to test each and every part manually. You clicked on the nice TMC button in NetBeans and then you could see which parts of your code worked, and which didn’t.</description></item><item><title>02 Parameterized tests</title><link>https://fontysvenlo.github.io/prc2/docs/parameterized-tests/</link><pubDate>Tue, 01 Feb 2022 14:17:33 +0100</pubDate><guid>https://fontysvenlo.github.io/prc2/docs/parameterized-tests/</guid><description>Table of ContentsParameterized testsParameterized test, Junit 5 styleLookup in a map.Test data from a fileRepeated use of same data.Test Recipe I, Test Equals and hashCodeLinksParameterized testsYou will often see that test methods look a lot like each other. As an example: In the fraction exercise, in most test methods you have two inputs and one or two results, then an operation is done followed by some assertion, often of the same kind.</description></item></channel></rss>
208 changes: 208 additions & 0 deletions docs/parameterized-tests/index.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/unit-testing-basics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<a class="mr-3 flex-none overflow-hidden md:w-auto dark:hover:text-gray-200 hover:text-gray-900" href=https://fontysvenlo.github.io/prc2/>PRC2</a><div class="relative flex ml-auto"><nav class="hidden md:flex items-center text-sm leading-6 font-semibold text-gray-700 dark:text-gray-200"><ul class="flex space-x-8"><li><a href=https://fontysvenlo.github.io/prc2/pages/tips/ class="hover:text-sky-500 dark:hover:text-sky-400">Tips</a></li><li><a href=https://fontysvenlo.github.io/prc2/pages/setup/ class="hover:text-sky-500 dark:hover:text-sky-400">Setup</a></li></ul></nav><div class="flex items-center lg:border-l border-gray-200 ml-6 pl-6 dark:border-gray-700"><button type=button id=theme-toggle>
<span class="dark:hidden hover:text-sky-500"><svg viewBox="0 0 24 24" width="24" height="24" class="w-5 h-5" stroke="currentcolor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></span><span class="hidden dark:inline hover:text-sky-400"><svg viewBox="0 0 24 24" width="24" height="24" class="w-5 h-5" stroke="currentcolor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg></span></button>
<a href=https://github.com/FontysVenlo/prc2 class="ml-6 block hover:text-sky-500 dark:hover:text-sky-400"><svg viewBox="0 0 24 24" width="24" height="24" class="w-5 h-5" stroke="currentcolor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37.0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44.0 0020 4.77 5.07 5.07.0 0019.91 1S18.73.65 16 2.48a13.38 13.38.0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07.0 005 4.77 5.44 5.44.0 003.5 8.55c0 5.42 3.3 6.61 6.44 7A3.37 3.37.0 009 18.13V22"/></svg></a></div></div></div></div></div></header><div class="max-w-8xl mx-auto px-4 sm:px-6 md:px-8"><aside id=menu class="hidden lg:block fixed z-20 inset-0 top-[3.5rem] left-[max(0px,calc(50%-45rem))] right-auto w-[19.5rem] pb-10 px-8 overflow-y-auto bg-white dark:bg-gray-800"><nav class="lg:leading-6 relative"><ul class="block md:hidden"><li class="mt-12 lg:mt-8"><h5 class="mb-8 lg:mb-3 font-semibold text-slate-900 dark:text-slate-200">General</h5><ul class="space-y-2 border-l border-gray-100 dark:border-gray-700"><li><a href=https://fontysvenlo.github.io/prc2/pages/tips/ class="block border-l pl-4 -ml-px border-transparent hover:border-slate-400 dark:hover:border-slate-500 text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-300">Tips</a></li><li><a href=https://fontysvenlo.github.io/prc2/pages/setup/ class="block border-l pl-4 -ml-px border-transparent hover:border-slate-400 dark:hover:border-slate-500 text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-300">Setup</a></li></ul></li></ul><ul><li class="mt-12 lg:mt-8"><h5 class="mb-8 lg:mb-3 font-semibold text-slate-900 dark:text-slate-200">Weeks</h5><ul class="space-y-2 border-l border-gray-100 dark:border-gray-700"><li><a href=https://fontysvenlo.github.io/prc2/docs/unit-testing-basics/ class="block border-l pl-4 -ml-px
border-slate-500 dark:border-slate-400 text-black dark:text-slate-200">01 Unit Testing Basics</a></li></ul></li></ul></nav></aside><div class=lg:pl-[19.5rem]><div class="max-w-3xl mx-auto xl:max-w-none xl:ml-0 xl:mr-[15.5rem] xl:pr-16"><article id=main-content class="prose prose-slate dark:prose-invert max-w-none dark:prose-a:text-fuchsia-400 prose-a:text-fuchsia-500"><nav id=toc class=toc role=doc-toc><h2 id=toc-title>Table of Contents</h2><ol class="toc-list level-1"><li><a href=#_write_your_own_tests>Write your own tests!</a></li><li><a href=#_testing_test_driven_development>Testing / Test Driven Development</a><ol class="toc-list level-2"><li><a href=#_what_are_tests_and_why_do_we_need_them>What are tests and why do we need them?</a></li><li><a href=#_test_driven_development_tdd>Test Driven Development (TDD)</a></li></ol></li><li><a href=#_arrange_act_assert>Arrange Act Assert</a></li><li><a href=#_clues_needed>Clues needed</a></li><li><a href=#_assertj_examples>AssertJ examples.</a><ol class="toc-list level-2"><li><a href=#_simple_tests>Simple Tests</a></li><li><a href=#_string_containment>String Containment</a></li><li><a href=#_collection_containment>Collection Containment</a></li><li><a href=#_assert_exceptions>Assert Exceptions</a></li></ol></li><li><a href=#_soft_assertions>Soft Assertions</a></li><li><a href=#_assumptions>Assumptions</a></li><li><a href=#_additional_pointers>Additional pointers</a></li></ol></nav><section class="doc-section level-1"><h2 id=_write_your_own_tests>Write your own tests!</h2><p><span class=big>Throughout the exercises of PRC1, you have become acquainted with the value of tests: You have a way of checking if your code is any good without having to
border-slate-500 dark:border-slate-400 text-black dark:text-slate-200">01 Unit Testing Basics</a></li><li><a href=https://fontysvenlo.github.io/prc2/docs/parameterized-tests/ class="block border-l pl-4 -ml-px
border-transparent hover:border-slate-400 dark:hover:border-slate-400 text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-200">02 Parameterized tests</a></li></ul></li></ul></nav></aside><div class=lg:pl-[19.5rem]><div class="max-w-3xl mx-auto xl:max-w-none xl:ml-0 xl:mr-[15.5rem] xl:pr-16"><article id=main-content class="prose prose-slate dark:prose-invert max-w-none dark:prose-a:text-fuchsia-400 prose-a:text-fuchsia-500"><nav id=toc class=toc role=doc-toc><h2 id=toc-title>Table of Contents</h2><ol class="toc-list level-1"><li><a href=#_write_your_own_tests>Write your own tests!</a></li><li><a href=#_testing_test_driven_development>Testing / Test Driven Development</a><ol class="toc-list level-2"><li><a href=#_what_are_tests_and_why_do_we_need_them>What are tests and why do we need them?</a></li><li><a href=#_test_driven_development_tdd>Test Driven Development (TDD)</a></li></ol></li><li><a href=#_arrange_act_assert>Arrange Act Assert</a></li><li><a href=#_clues_needed>Clues needed</a></li><li><a href=#_assertj_examples>AssertJ examples.</a><ol class="toc-list level-2"><li><a href=#_simple_tests>Simple Tests</a></li><li><a href=#_string_containment>String Containment</a></li><li><a href=#_collection_containment>Collection Containment</a></li><li><a href=#_assert_exceptions>Assert Exceptions</a></li></ol></li><li><a href=#_soft_assertions>Soft Assertions</a></li><li><a href=#_assumptions>Assumptions</a></li><li><a href=#_additional_pointers>Additional pointers</a></li></ol></nav><section class="doc-section level-1"><h2 id=_write_your_own_tests>Write your own tests!</h2><p><span class=big>Throughout the exercises of PRC1, you have become acquainted with the value of tests: You have a way of checking if your code is any good without having to
test each and every part manually. You clicked on the nice TMC button in NetBeans and then you could see which parts of your code worked, and which didn’t.
There is a catch though: Out there in the real world, there won’t be any NetBeans button doing that magic for you, nor will some teacher or school
provide the tests for you, so <strong class=red>you will be on your own</strong>.</span></p><p>But fret not! Writing tests is typically much simpler than writing the actual code. At least, it is when you follow a basic set of steps:</p><div class="olist arabic"><ol class=arabic><li><strong class=blue>A</strong>rrange: Prepare or set up the thing you want to test</li><li><strong class=blue>A</strong>ct: Interact with the object you are testing</li><li><strong class=blue>A</strong>ssert or Ensure that the observable result(s) is/are as expected.</li><li>If it says <strong class=red>boom</strong>, then at least you learned something …​.</li></ol></div><p><strong>Topics week 1</strong></p><div class=ulist><ul><li>Test Driven Development.</li><li>Maven configuration as exercise.</li><li><strong>A</strong>rrange <strong>A</strong>ct <strong>A</strong>ssert</li><li>JUnit (5) as test framework.</li><li>AssertJ as assertion library.</li></ul></div></section><section class="doc-section level-1"><h2 id=_testing_test_driven_development>Testing / Test Driven Development</h2><section class="doc-section level-2"><h3 id=_what_are_tests_and_why_do_we_need_them>What are tests and why do we need them?</h3><p id=_tdd>The way that you have worked with Java so far is that you had to write some code
Expand Down
Loading

0 comments on commit 6902bf3

Please sign in to comment.