Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
add docs to optional test 12 based on issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
J1411 committed Oct 15, 2023
1 parent 3aefd3e commit a93a3c8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ public float calculateDisasterClaimDensity(int id) {
// region TestSet4

/**
* Gets the top three months with the highest total claim cost
* Gets the top three months with the highest number of claims
*
* OPTIONAL! OPTIONAL! OPTIONAL!
* AS OF 9:21CDT, TEST IS OPTIONAL. SEE GITHUB ISSUE #8 FOR MORE DETAILS
*
* Hint:
* - Month should be full name like 01 is January and 12 is December
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public void initialize() {
controller = new SimpleDataTool();
}

/**
* OPTIONAL! OPTIONAL! OPTIONAL!
* AS OF 9:21CDT, TEST IS OPTIONAL. SEE GITHUB ISSUE #8 FOR MORE DETAILS
*/
@Test
public void test12_getTopThreeMonthsWithHighestNumOfClaimsDesc() {
String[] topThreeMonths = controller.getTopThreeMonthsWithHighestNumOfClaimsDesc();
Expand Down
4 changes: 4 additions & 0 deletions nodejs/application.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ describe("Test Set Three", () => {
});

describe("Test Set Four", () => {
/**
* OPTIONAL! OPTIONAL! OPTIONAL!
* AS OF 9:21 CDT, TEST IS OPTIONAL. SEE GITHUB ISSUE #8 FOR MORE DETAILS
*/
test("Test 12 - getTopThreeMonthsWithHighestNumOfClaimsDesc", () => {
const topThreeMonths =
controller.getTopThreeMonthsWithHighestNumOfClaimsDesc();
Expand Down
5 changes: 4 additions & 1 deletion nodejs/simpleDataTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ class SimpleDataTool {

/**
* Gets the top three months with the highest total claim cost.
*
*
* OPTIONAL! OPTIONAL! OPTIONAL!
* AS OF 9:21 CDT, TEST IS OPTIONAL. SEE GITHUB ISSUE #8 FOR MORE DETAILS
*
* Hint:
* Month should be full name like 01 is January and 12 is December.
* Year should be full four-digit year.
Expand Down
5 changes: 4 additions & 1 deletion python/simple_data_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def calculate_disaster_claim_density(self, disaster_id):
# region TestSetFour

def get_top_three_months_with_highest_num_of_claims_desc(self):
"""Gets the top three months with the highest total claim cost
"""Gets the top three months with the highest number of claims
OPTIONAL! OPTIONAL! OPTIONAL!
AS OF 9:21CDT, TEST IS OPTIONAL. SEE GITHUB ISSUE #8 FOR MORE DETAILS
Hint:
Month should be full name like 01 is January and 12 is December
Expand Down
7 changes: 6 additions & 1 deletion python/test/test_simple_data_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ def test_calculate_disaster_claim_density(self, controller):
class TestSetFour:

def test_get_top_three_months_with_highest_num_of_claims_desc(self, controller):
"""Test 12"""
"""Test 12
OPTIONAL! OPTIONAL! OPTIONAL!
AS OF 9:21CDT, TEST IS OPTIONAL. SEE GITHUB ISSUE #8 FOR MORE DETAILS
"""
top_three_months = controller.get_top_three_months_with_highest_num_of_claims_desc()
assert len(top_three_months) == 3
assert top_three_months[0] == 'April 2023'
Expand Down

0 comments on commit a93a3c8

Please sign in to comment.