Skip to content

Commit

Permalink
deploy: f8c4a2e
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 16, 2023
1 parent 7cadd7e commit da6a420
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion UserGuide.page-vue-render.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,6 @@ with(this){return _c('h2',{attrs:{"id":"command-summary"}},[_v("Command summary"
with(this){return _c('div',{staticClass:"table-responsive"},[_c('table',{staticClass:"markbind-table table table-bordered table-striped"},[_c('thead',[_c('tr',[_c('th',[_v("Action")]),_v(" "),_c('th',[_v("Format, Examples")])])]),_v(" "),_c('tbody',[_c('tr',[_c('td',[_c('strong',[_v("Add")])]),_v(" "),_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("add n/NAME c/COURSE e/EMAIL")]),_v(" "),_c('br'),_v(" e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("add n/Susan Tan c/CS1101S e/[email protected]")])])]),_v(" "),_c('tr',[_c('td',[_c('strong',[_v("Edit")])]),_v(" "),_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("edit INDEX [n/NAME] [c/COURSE] [e/EMAIL] [r/REMARK]")]),_v(" "),_c('br'),_v(" e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("edit 1 c/CS1101S e/[email protected]")])])]),_v(" "),_c('tr',[_c('td',[_c('strong',[_v("Delete")])]),_v(" "),_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("delete INDEX")]),_c('br'),_v(" e.g.,"),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("delete 2")])])]),_v(" "),_c('tr',[_c('td',[_c('strong',[_v("Tag")])]),_v(" "),_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("tag INDEX t/ [ENUM_TAG]")]),_c('br'),_v(" e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("tag 1 t/AVERAGE")])])]),_v(" "),_c('tr',[_c('td',[_c('strong',[_v("Remark")])]),_v(" "),_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("remark INDEX r/REMARK")]),_v(" "),_c('br'),_v(" e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("remark 2 r/needs more help")])])]),_v(" "),_c('tr',[_c('td',[_c('strong',[_v("Exit")])]),_v(" "),_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("exit")])])])])])])}
},function anonymous(
) {
with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("["),_c('span',[_c('strong',[_v("Powered by")])]),_v(" "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.1.0")]),_v(", generated on Sun, 15 Oct 2023, 15:16:23 GMT+8]")])])])}
with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("["),_c('span',[_c('strong',[_v("Powered by")])]),_v(" "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.1.0")]),_v(", generated on Mon, 16 Oct 2023, 16:03:21 GMT+8]")])])])}
}];

Binary file modified images/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/tiongjjyi.png
Binary file not shown.
2 changes: 1 addition & 1 deletion tutorials/AddRemark.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
</span><span> <span class="hljs-keyword">return</span> String.format(message, personToEdit);
</span><span> }
</span></code></pre><p><a href="/tp/images/add-remark/RemarkComplete.png" target="_self"><img src="/tp/images/add-remark/RemarkComplete.png" alt="Congratulations!" class="img-fluid"></a></p> <h2 id="writing-tests">Writing tests<a href="#writing-tests" onclick="event.stopPropagation()" class="fa fa-anchor"></a></h2> <p>Tests are crucial to ensuring that bugs don’t slip into the codebase unnoticed. This is especially true for large code bases where a change might lead to unintended behavior.</p> <p>Let’s verify the correctness of our code by writing some tests!</p> <p>Of course you can simply add the test cases manually, like you've been doing all along this tutorial. The result would be like the test cases in <a href="https://github.com/se-edu/addressbook-level3/commit/fac8f3fd855d55831ca0cc73313b5943d49d4d6e#diff-ff58f7c10338b34f76645df49b71ecb2bafaf7611b20e7ff59ebc98475538a01">here</a>. Alternatively, you can get the help of IntelliJ to generate the skeletons of the test cases, as explained in the next section.</p> <h3 id="automatically-generating-tests">Automatically generating tests<a href="#automatically-generating-tests" onclick="event.stopPropagation()" class="fa fa-anchor"></a></h3> <p>The goal is to write effective and efficient tests to ensure that <code class="hljs inline no-lang">RemarkCommand#execute()</code> behaves as expected.</p> <p>The convention for test names is <code class="hljs inline no-lang">methodName_testScenario_expectedResult</code>. An example would be
<code class="hljs inline no-lang">execute_filteredList_success</code>.</p> <p>Let’s create a test for <code class="hljs inline no-lang">RemarkCommand#execute()</code> to test that adding a remark works. On <code class="hljs inline no-lang">IntelliJ IDEA</code> you can bring up the context menu and choose to <code class="hljs inline no-lang">Go To</code> &gt; <code class="hljs inline no-lang">Test</code> or use the appropriate keyboard shortcut.</p> <p><a href="/tp/images/add-remark/ContextMenu.png" target="_self"><img src="/tp/images/add-remark/ContextMenu.png" alt="Using the context menu to jump to tests" class="img-fluid"></a></p> <p>Then, create a test for the <code class="hljs inline no-lang">execute</code> method.</p> <p><a href="/tp/images/add-remark/CreateTest.png" target="_self"><img src="/tp/images/add-remark/CreateTest.png" alt="Creating a test for `execute`." class="img-fluid"></a></p> <p>Following convention, let’s change the name of the generated method to <code class="hljs inline no-lang">execute_addRemarkUnfilteredList_success</code>.</p> <p>Let’s use the utility functions provided in <code class="hljs inline no-lang">CommandTestUtil</code>. The functions ensure that commands produce the expected <code class="hljs inline no-lang">CommandResult</code> and output the correct message. In this case, <code class="hljs inline no-lang">CommandTestUtil#assertCommandSuccess</code> is the best fit as we are testing that a <code class="hljs inline no-lang">RemarkCommand</code> will successfully add a <code class="hljs inline no-lang">Remark</code>.</p> <p>You should end up with a test that looks something like <a href="https://github.com/se-edu/addressbook-level3/commit/fac8f3fd855d55831ca0cc73313b5943d49d4d6e#diff-ff58f7c10338b34f76645df49b71ecb2bafaf7611b20e7ff59ebc98475538a01R36-R49">this</a>.</p> <h2 id="conclusion">Conclusion<a href="#conclusion" onclick="event.stopPropagation()" class="fa fa-anchor"></a></h2> <p>This concludes the tutorial for adding a new <code class="hljs inline no-lang">Command</code> to AddressBook.</p></div> <nav id="page-nav" data-v-e6005420><div class="nav-component slim-scroll" data-v-e6005420><nav id="mb-page-nav" class="nav nav-pills flex-column my-0 small no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#tutorial-adding-a-command" data-v-e6005420>Tutorial: Adding a command‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#create-a-new-remark-command" data-v-e6005420>Create a new remark command‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#hook-remarkcommand-into-the-application" data-v-e6005420>Hook RemarkCommand into the application‎</a> <a class="nav-link py-1" href="#run-the-application" data-v-e6005420>Run the application‎</a></nav> <a class="nav-link py-1" href="#change-remarkcommand-to-throw-an-exception" data-v-e6005420>Change RemarkCommand to throw an exception‎</a> <a class="nav-link py-1" href="#enhancing-remarkcommand" data-v-e6005420>Enhancing RemarkCommand‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#make-the-command-accept-parameters" data-v-e6005420>Make the command accept parameters‎</a> <a class="nav-link py-1" href="#parse-user-input" data-v-e6005420>Parse user input‎</a></nav> <a class="nav-link py-1" href="#add-remark-to-the-model" data-v-e6005420>Add Remark to the model‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#add-a-new-remark-class" data-v-e6005420>Add a new Remark class‎</a> <a class="nav-link py-1" href="#make-use-of-remark" data-v-e6005420>Make use of Remark‎</a></nav> <a class="nav-link py-1" href="#add-a-placeholder-element-for-remark-to-the-ui" data-v-e6005420>Add a placeholder element for remark to the UI‎</a> <a class="nav-link py-1" href="#modify-person-to-support-a-remark-field" data-v-e6005420>Modify Person to support a Remark field‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#modify-person" data-v-e6005420>Modify Person‎</a> <a class="nav-link py-1" href="#update-other-usages-of-person" data-v-e6005420>Update other usages of Person‎</a></nav> <a class="nav-link py-1" href="#updating-storage" data-v-e6005420>Updating Storage‎</a> <a class="nav-link py-1" href="#finalizing-the-ui" data-v-e6005420>Finalizing the UI‎</a> <a class="nav-link py-1" href="#putting-everything-together" data-v-e6005420>Putting everything together‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#update-remarkcommand-and-remarkcommandparser" data-v-e6005420>Update RemarkCommand and RemarkCommandParser‎</a></nav> <a class="nav-link py-1" href="#writing-tests" data-v-e6005420>Writing tests‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#automatically-generating-tests" data-v-e6005420>Automatically generating tests‎</a></nav> <a class="nav-link py-1" href="#conclusion" data-v-e6005420>Conclusion‎</a></nav> <!----></nav></div> <!----></nav> <div aria-hidden="true" class="scroll-top-button fa-lg d-print-none" style="display:none;bottom:2%;right:2%;position:fixed;"><i class="fas fa-arrow-circle-up"></i></div></div> <footer><div class="text-center"><small>[<span><strong>Powered by</strong></span> <img src="https://markbind.org/favicon.ico" width="30"> <a href="https://markbind.org/">MarkBind 5.1.0</a>, generated on Sun, 15 Oct 2023, 15:16:23 GMT+8]</small></div></footer></div>
<code class="hljs inline no-lang">execute_filteredList_success</code>.</p> <p>Let’s create a test for <code class="hljs inline no-lang">RemarkCommand#execute()</code> to test that adding a remark works. On <code class="hljs inline no-lang">IntelliJ IDEA</code> you can bring up the context menu and choose to <code class="hljs inline no-lang">Go To</code> &gt; <code class="hljs inline no-lang">Test</code> or use the appropriate keyboard shortcut.</p> <p><a href="/tp/images/add-remark/ContextMenu.png" target="_self"><img src="/tp/images/add-remark/ContextMenu.png" alt="Using the context menu to jump to tests" class="img-fluid"></a></p> <p>Then, create a test for the <code class="hljs inline no-lang">execute</code> method.</p> <p><a href="/tp/images/add-remark/CreateTest.png" target="_self"><img src="/tp/images/add-remark/CreateTest.png" alt="Creating a test for `execute`." class="img-fluid"></a></p> <p>Following convention, let’s change the name of the generated method to <code class="hljs inline no-lang">execute_addRemarkUnfilteredList_success</code>.</p> <p>Let’s use the utility functions provided in <code class="hljs inline no-lang">CommandTestUtil</code>. The functions ensure that commands produce the expected <code class="hljs inline no-lang">CommandResult</code> and output the correct message. In this case, <code class="hljs inline no-lang">CommandTestUtil#assertCommandSuccess</code> is the best fit as we are testing that a <code class="hljs inline no-lang">RemarkCommand</code> will successfully add a <code class="hljs inline no-lang">Remark</code>.</p> <p>You should end up with a test that looks something like <a href="https://github.com/se-edu/addressbook-level3/commit/fac8f3fd855d55831ca0cc73313b5943d49d4d6e#diff-ff58f7c10338b34f76645df49b71ecb2bafaf7611b20e7ff59ebc98475538a01R36-R49">this</a>.</p> <h2 id="conclusion">Conclusion<a href="#conclusion" onclick="event.stopPropagation()" class="fa fa-anchor"></a></h2> <p>This concludes the tutorial for adding a new <code class="hljs inline no-lang">Command</code> to AddressBook.</p></div> <nav id="page-nav" data-v-e6005420><div class="nav-component slim-scroll" data-v-e6005420><nav id="mb-page-nav" class="nav nav-pills flex-column my-0 small no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#tutorial-adding-a-command" data-v-e6005420>Tutorial: Adding a command‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#create-a-new-remark-command" data-v-e6005420>Create a new remark command‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#hook-remarkcommand-into-the-application" data-v-e6005420>Hook RemarkCommand into the application‎</a> <a class="nav-link py-1" href="#run-the-application" data-v-e6005420>Run the application‎</a></nav> <a class="nav-link py-1" href="#change-remarkcommand-to-throw-an-exception" data-v-e6005420>Change RemarkCommand to throw an exception‎</a> <a class="nav-link py-1" href="#enhancing-remarkcommand" data-v-e6005420>Enhancing RemarkCommand‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#make-the-command-accept-parameters" data-v-e6005420>Make the command accept parameters‎</a> <a class="nav-link py-1" href="#parse-user-input" data-v-e6005420>Parse user input‎</a></nav> <a class="nav-link py-1" href="#add-remark-to-the-model" data-v-e6005420>Add Remark to the model‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#add-a-new-remark-class" data-v-e6005420>Add a new Remark class‎</a> <a class="nav-link py-1" href="#make-use-of-remark" data-v-e6005420>Make use of Remark‎</a></nav> <a class="nav-link py-1" href="#add-a-placeholder-element-for-remark-to-the-ui" data-v-e6005420>Add a placeholder element for remark to the UI‎</a> <a class="nav-link py-1" href="#modify-person-to-support-a-remark-field" data-v-e6005420>Modify Person to support a Remark field‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#modify-person" data-v-e6005420>Modify Person‎</a> <a class="nav-link py-1" href="#update-other-usages-of-person" data-v-e6005420>Update other usages of Person‎</a></nav> <a class="nav-link py-1" href="#updating-storage" data-v-e6005420>Updating Storage‎</a> <a class="nav-link py-1" href="#finalizing-the-ui" data-v-e6005420>Finalizing the UI‎</a> <a class="nav-link py-1" href="#putting-everything-together" data-v-e6005420>Putting everything together‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#update-remarkcommand-and-remarkcommandparser" data-v-e6005420>Update RemarkCommand and RemarkCommandParser‎</a></nav> <a class="nav-link py-1" href="#writing-tests" data-v-e6005420>Writing tests‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#automatically-generating-tests" data-v-e6005420>Automatically generating tests‎</a></nav> <a class="nav-link py-1" href="#conclusion" data-v-e6005420>Conclusion‎</a></nav> <!----></nav></div> <!----></nav> <div aria-hidden="true" class="scroll-top-button fa-lg d-print-none" style="display:none;bottom:2%;right:2%;position:fixed;"><i class="fas fa-arrow-circle-up"></i></div></div> <footer><div class="text-center"><small>[<span><strong>Powered by</strong></span> <img src="https://markbind.org/favicon.ico" width="30"> <a href="https://markbind.org/">MarkBind 5.1.0</a>, generated on Mon, 16 Oct 2023, 16:03:21 GMT+8]</small></div></footer></div>
</body><script src="/tp/markbind/js/bootstrap-utility.min.js"></script>
<script>
MarkBind.setupWithSearch()
Expand Down
2 changes: 1 addition & 1 deletion tutorials/AddRemark.page-vue-render.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tutorials/RemovingFields.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</span><span> <span class="hljs-attr">&quot;address&quot;</span>: <span class="hljs-string">&quot;4th street&quot;</span>
</span><span> } ]
</span><span>}
</span></code></pre><p>You can go through each individual <code class="hljs inline no-lang">json</code> file and manually remove the <code class="hljs inline no-lang">address</code> field.</p></div> <nav id="page-nav" data-v-e6005420><div class="nav-component slim-scroll" data-v-e6005420><nav id="mb-page-nav" class="nav nav-pills flex-column my-0 small no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#tutorial-removing-fields" data-v-e6005420>Tutorial: Removing Fields‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#safely-deleting-address" data-v-e6005420>Safely deleting Address‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#assisted-refactoring" data-v-e6005420>Assisted refactoring‎</a> <a class="nav-link py-1" href="#manual-refactoring" data-v-e6005420>Manual refactoring‎</a></nav> <a class="nav-link py-1" href="#tidying-up" data-v-e6005420>Tidying up‎</a></nav> <!----></nav></div> <!----></nav> <div aria-hidden="true" class="scroll-top-button fa-lg d-print-none" style="display:none;bottom:2%;right:2%;position:fixed;"><i class="fas fa-arrow-circle-up"></i></div></div> <footer><div class="text-center"><small>[<span><strong>Powered by</strong></span> <img src="https://markbind.org/favicon.ico" width="30"> <a href="https://markbind.org/">MarkBind 5.1.0</a>, generated on Sun, 15 Oct 2023, 15:16:23 GMT+8]</small></div></footer></div>
</span></code></pre><p>You can go through each individual <code class="hljs inline no-lang">json</code> file and manually remove the <code class="hljs inline no-lang">address</code> field.</p></div> <nav id="page-nav" data-v-e6005420><div class="nav-component slim-scroll" data-v-e6005420><nav id="mb-page-nav" class="nav nav-pills flex-column my-0 small no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#tutorial-removing-fields" data-v-e6005420>Tutorial: Removing Fields‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#safely-deleting-address" data-v-e6005420>Safely deleting Address‎</a> <nav class="nav nav-pills flex-column my-0 nested no-flex-wrap" data-v-e6005420><a class="nav-link py-1" href="#assisted-refactoring" data-v-e6005420>Assisted refactoring‎</a> <a class="nav-link py-1" href="#manual-refactoring" data-v-e6005420>Manual refactoring‎</a></nav> <a class="nav-link py-1" href="#tidying-up" data-v-e6005420>Tidying up‎</a></nav> <!----></nav></div> <!----></nav> <div aria-hidden="true" class="scroll-top-button fa-lg d-print-none" style="display:none;bottom:2%;right:2%;position:fixed;"><i class="fas fa-arrow-circle-up"></i></div></div> <footer><div class="text-center"><small>[<span><strong>Powered by</strong></span> <img src="https://markbind.org/favicon.ico" width="30"> <a href="https://markbind.org/">MarkBind 5.1.0</a>, generated on Mon, 16 Oct 2023, 16:03:21 GMT+8]</small></div></footer></div>
</body><script src="/tp/markbind/js/bootstrap-utility.min.js"></script>
<script>
MarkBind.setupWithSearch()
Expand Down
Loading

0 comments on commit da6a420

Please sign in to comment.