- HDSS-RF-01
- Equivalence classes
- Boundary limits
- Test cases
- Syntax analysis
- HDSS-RF-02
- Equivalence classes
- Boundary limits
- Test cases
- Syntax analysis
- HDSS-RF-03
- Syntax analysis
-
Equivalence class: HDSS-FN1-EQ-1
- Input: Non existing filename
- Result: Error. "An input data file is not found"
-
Equivalence class: HDSS-FN1-EQ-2
- Input: Valid filename "validRegisterHydricResourcesCase.json"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-3
- Input: Valid JSON file
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-4
- Input: Non JSON format
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-5
- Input: Empty file
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-6
- Input: Non empty file
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-7
- Input: Existing irrigation basin name
- Result: Error. "Tried to record an irrigation basin with an existing name"
-
Equivalence class: HDSS-FN1-EQ-8
- Input: Non existing irrigation basin name
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-9
- Input: Under 50 chars irrigation basin name "shortName"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-10
- Input: Over 50 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyreallyLongName"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-11
- Input: No irrigation basin name found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-12
- Input: Two or more irrigation basin names found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-13
- Input: One irrigation basin name found
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-14
- Input: No resources list found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-15
- Input: Two or more resources lists found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-16
- Input: One resources list found
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-17
- Input: Existing resource name
- Result: Error. "Tried to record a resource basin with an existing name"
-
Equivalence class: HDSS-FN1-EQ-18
- Input: Non existing resource name
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-19
- Input: Under 50 chars resource basin name "shortName"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-20
- Input: Over 50 chars resource name "reallyreallyreallyreallyreallyreallyreallyreallyLongName"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-21
- Input: No resource name found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-22
- Input: Two or more resource names found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-23
- Input: One resource basin name found
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-24
- Input: Resource type value = "Reservoir"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-25
- Input: Resource type value = "Desalination plant"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-26
- Input: Resource type value = "Aquifer"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-27
- Input: Resource type value = "My mom"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-28
- Input: No resource type found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-29
- Input: Two or more resource types found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-30
- Input: One resource basin type found
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-31
- Input: Negative capacity
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-32
- Input: Positive capacity
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-33
- Input: Capacity values is not a number "2.23"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-34
- Input: Capacity values is a number "2.23"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-35
- Input: Capacity values is a number with more than 2 decimals "2.231"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-36
- Input: Capacity values is a number with 2 or less decimals "2.23"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-37
- Input: No capacity found and resource type is not "aquifer"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-38
- Input: Two or more capacity values found and resource type is not "aquifer"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN1-EQ-39
- Input: One capacity value found and resource type is not "aquifer"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-40
- Input: No capacity found and resource type is "aquifer"
- Result: Valid case
-
Equivalence class: HDSS-FN1-EQ-41
- Input: One or more capacity values found and resource type is "aquifer"
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN1-BL-1
- Input: 49 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyLongNam"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-2
- Input: 50 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyLongName"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-3
- Input: 51 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyLongNamee"
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN1-BL-4
- Input: 49 chars resource name "reallyreallyreallyreallyreallyreallyreallyLongNam"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-5
- Input: 50 chars resource name "reallyreallyreallyreallyreallyreallyreallyLongName"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-6
- Input: 51 chars resource name "reallyreallyreallyreallyreallyreallyreallyLongNamee"
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN1-BL-7
- Input: Capacity value 0.00
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-8
- Input: Capacity value 0.01
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-9
- Input: Capacity value -0.01
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN1-BL-10
- Input capacity: capacity with 2 decimals "2.23"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-11
- Input capacity: capacity with 1 decimal "2.2"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-12
- Input capacity: capacity with no decimals "2"
- Result: valid case
-
Boundary limit: HDSS-FN1-BL-13
- Input capacity: capacity with 3 decimal "2.223"
- Result: Error: "The input file has no data or does not match the expected format"
- Equivalence classes considered: HDSS-FN1-EQ-2, HDSS-FN1-EQ-3, HDSS-FN1-EQ-6, HDSS-FN1-EQ-8, HDSS-FN1-EQ-9, HDSS-FN1-EQ-13, HDSS-FN1-EQ-16, HDSS-FN1-EQ-18, HDSS-FN1-EQ-19, HDSS-FN1-EQ-23, HDSS-FN1-EQ-24, HDSS-FN1-EQ-25, HDSS-FN1-EQ-26, HDSS-FN1-EQ-30, HDSS-FN1-EQ-32, HDSS-FN1-EQ-34, HDSS-FN1-EQ-36, HDSS-FN1-EQ-39, HDSS-FN1-EQ-40
- Input:
- Filename: "hdss-rf01-validRegisterHydricResourcesCase.json"
- Expected output: "hdss-rf01-expectedValidRegisterHydricResourcesCase.json"
- Equivalence class considered: HDSS-FN1-EQ-1
- Input:
- Filename "nonexists.json"
- Expected output: Throws Exception. Error message: "An input data file is not found"
- Boundary limit considered: HDSS-FN1-BL-7
- Input:
- Filename "hdss-rf01-capacityZero.json"
- Expected output: "hdss-rf01-expectedCapacityZero.json"
- Equivalence class considered: HDSS-FN1-EQ-4
- Input:
- Filename "hdss-rf01-invalidJson.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-5
- Input:
- Filename "hdss-rf01-empty.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-7
- Input:
- Filename "hdss-rf01-existingIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "Tried to record an irrigation basin with an existing name"
- Equivalence class considered: HDSS-FN1-EQ-10
- Input:
- Filename "hdss-rf01-longIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-11
- Input:
- Filename "hdss-rf01-noIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-12
- Input:
- Filename "hdss-rf01-severalIrrigationBasinNames.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-14
- Input:
- Filename "hdss-rf01-noResourcesList.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-15
- Input:
- Filename "hdss-rf01-severalResourcesLists.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-17
- Input:
- Filename "hdss-rf01-existingResourceName.json"
- Expected output: Throws Exception. Error message: "Tried to record a resource basin with an existing name"
- Equivalence class considered: HDSS-FN1-EQ-20
- Input:
- Filename "hdss-rf01-longResourceName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-21
- Input:
- Filename "hdss-rf01-noResourceName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-22
- Input:
- Filename "hdss-rf01-severalResourceNames.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-27
- Input:
- Filename "hdss-rf01-invalidResourceType.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-28
- Input:
- Filename "hdss-rf01-noResourceType.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-29
- Input:
- Filename "hdss-rf01-severalResourceTypes.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-31
- Input:
- Filename "hdss-rf01-negativeResourceCapacity.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-33
- Input:
- Filename "hdss-rf01-notValidResourceCapacity.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-35
- Input:
- Filename "hdss-rf01-notValidResourceCapacityDecimalFormat.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-37
- Input:
- Filename "hdss-rf01-noCapacityNotAquifer.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-38
- Input:
- Filename "hdss-rf01-severalCapacityValuesNotAquifer.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN1-EQ-41
- Input:
- Filename "hdss-rf01-capacityFoundAquifer.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN1-BL-1
- Input:
- Filename "hdss-rf01-validIrrigationBasinName49.json"
- Expected output: "hdss-rf01-expectedValidIrrigationBasinName49.json"
- Boundary limit considered: HDSS-FN1-BL-2
- Input:
- Filename "hdss-rf01-validIrrigationBasinName50.json"
- Expected output: "hdss-rf01-expectedValidIrrigationBasinName50.json"
- Boundary limit considered: HDSS-FN1-BL-3
- Input:
- Filename "hdss-rf01-invalidIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN1-BL-4
- Input:
- Filename "hdss-rf01-validResourceName49.json"
- Expected output: "hdss-rf01-expectedValidResourceName49.json"
- Boundary limit considered: HDSS-FN1-BL-5
- Input:
- Filename "hdss-rf01-validResourceName50.json"
- Expected output: "hdss-rf01-expectedValidResourceName50.json"
- Boundary limit considered: HDSS-FN1-BL-6
- Input:
- Filename "hdss-rf01-invalidResourceName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN1-BL-8
- Input:
- Filename "hdss-rf01-validResourceCapacity0_01.json"
- Expected output: "hdss-rf01-expectedValidResourceCapacity0_01.json"
- Boundary limit considered: HDSS-FN1-BL-9
- Input:
- Filename "hdss-rf01-invalidResourceCapacity.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN1-BL-10
- Input:
- Filename "hdss-rf01-validResourceCapacityTwoDecimals.json"
- Expected output: "hdss-rf01-expectedValidResourceCapacityTwoDecimals.json"
- Boundary limit considered: HDSS-FN1-BL-11
- Input:
- Filename "hdss-rf01-validResourceCapacityOneDecimal.json"
- Expected output: "hdss-rf01-expectedValidResourceCapacityOneDecimal.json"
- Boundary limit considered: HDSS-FN1-BL-12
- Input:
- Filename "hdss-rf01-validResourceCapacityZeroDecimals.json"
- Expected output: "hdss-rf01-expectedValidResourceCapacityZeroDecimals.json"
- Boundary limit considered: HDSS-FN1-BL-13
- Input:
- Filename "hdss-rf01-invalidResourceCapacityThreeDecimals.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
-
File::= Init_Object Body End_Object
-
Body::= Irrigation_Basin_Name Label_Value_Separator Resources
-
Irrigation_Basin_Name::= Quotes Irrigation_Basin_Name_Value Quotes
-
Resources::= Init_Array 0{Resource_Object Fields_Separator}n 0{Resource_Object}1 End_Array
-
Irrigation_Basin_Name_Value::== 1{Character}50
-
Resource_Object::= Init_Object Resource_Name Fields_Separator Resource_Type Fields_Separator Resource_Capacity End_Object
-
Resource_Name::= Quotes Resource_Name_Label Quotes Label_Value_Separator Quotes Resource_Name_Value Quotes
-
Resource_Type::= Quotes Resource_Type_Label Quotes Label_Value_Separator Quotes Resource_Type_Value Quotes
-
Resource_Capacity::= Quotes Resource_Capacity_Label Quotes Label_Value_Separator Resource_Capacity_Value
-
Resource_Name_Label::= 'Name'
-
Resource_Type_Label::= 'Type'
-
Resource_Capacity_Label::= 'Capacity'
-
Resource_Name_Value::= 1{Character}50
-
Resource_Type_Value::= 'Reservoir'|'Desalination plant'|'Aquifer'
-
Resource_Capacity_Value::= 1{Number}n 0{Point 0{Number}2 }1
-
Init_Object::='{'
-
End_Object::='}'
-
Label_Value_Separator::=':'
-
Init_Array::='['
-
End_Array::=']'
-
Fields_Separator::=','
-
Quotes::='"'
-
Character::='a'|'b'|'c'|...|'z'
-
Point::='.'
-
Number::='0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
- Type of case: Node omission
- Input: hdss-rf01-syntaxError1.json
- Expected value: Error: "Empty file"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError2.json
- Expected value: Error: "Missing {"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError3.json
- Expected value: Error: "Missing body"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError4.json
- Expected value: Error: "Missing }"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError5.json
- Expected value: Error: "Missing irrigation_basin_name"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError6.json
- Expected value: Error: "Missing :"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError7.json
- Expected value: Error: "Missing resource array"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError8.json
- Expected value: Error: "Missing ["
- Type of case: Node omission
- Input: hdss-rf01-syntaxError9.json
- Expected value: Error: "Missing ]"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError10.json
- Expected value: Error: "Missing resource name field"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError11.json
- Expected value: Error: "Missing resource type field"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError12.json
- Expected value: Error: "Missing resource capacity field"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError13.json
- Expected value: Error: "Missing resource label"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError14.json
- Expected value: Error: "Missing resource value"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError15.json
- Expected value: Error: "Missing capacity value"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError16.json
- Expected value: Error: "Missing ."
- Type of case: Node omission
- Input: hdss-rf01-syntaxError17.json
- Expected value: Error: "Missing ,"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError18.json
- Expected value: Error: "Missing resource name value"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError19.json
- Expected value: Error: "Missing left quotes"
- Type of case: Node omission
- Input: hdss-rf01-syntaxError20.json
- Expected value: Error: "Missing right quotes"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError21.json
- Expected value: Error: "Repetition of {"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError22.json
- Expected value: Error: "Repetition of }"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError23.json
- Expected value: Error: "Repetition of file"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError24.json
- Expected value: Error: "Repetition of body"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError25.json
- Expected value: Error: "Repetition of irrigation_basin_name"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError26.json
- Expected value: Error: "Repetition of :"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError27.json
- Expected value: Error: "Repetition of resources array"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError28.json
- Expected value: Error: "Repetition of ["
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError29.json
- Expected value: Error: "Repetition of ]"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError30.json
- Expected value: Error: "Repetition of resource name"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError31.json
- Expected value: Error: "Repetition of resource label"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError32.json
- Expected value: Error: "Repetition of resource value"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError33.json
- Expected value: Error: "Repetition of resource capacity value"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError34.json
- Expected value: Error: "Repetition of ."
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError35.json
- Expected value: Error: "Repetition of ,"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError36.json
- Expected value: Error: "Repetition of left quotes"
- Type of case: Node repetition
- Input: hdss-rf01-syntaxError37.json
- Expected value: Error: "Repetition of right quotes"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError38.json
- Expected value: Error: "Modification of {"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError39.json
- Expected value: Error: "Modification of }"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError40.json
- Expected value: Error: "Modification of body"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError41.json
- Expected value: Error: "Modification of :"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError42.json
- Expected value: Error: "Modification of ["
- Type of case: Node modification
- Input: hdss-rf01-syntaxError43.json
- Expected value: Error: "Modification of ]"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError44.json
- Expected value: Error: "Modification of left quotes"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError45.json
- Expected value: Error: "Modification of right quotes"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError46.json
- Expected value: Error: "Modification of name resource label"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError47.json
- Expected value: Error: "Modification of type resource label"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError48.json
- Expected value: Error: "Modification of type resource value"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError49.json
- Expected value: Error: "Modification of capacity resource label"
- Type of case: Node modification
- Input: hdss-rf01-syntaxError50.json
- Expected value: Error: "Modification of ."
- Type of case: Node modification
- Input: hdss-rf01-syntaxError51.json
- Expected value: Error: "Modification of ,"
- Type of case: Valid case
- Input: hdss-rf01-correctFile.json
- Expected value: Error: "Valid file"
-
Equivalence class: HDSS-FN2-EQ-1
- Input: Non existing filename
- Result: Error. "An input data file is not found"
-
Equivalence class: HDSS-FN2-EQ-2
- Input: Valid filename "validRegisterHydricResourcesCase.json"
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-3
- Input: Valid JSON file
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-4
- Input: Non JSON format
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-5
- Input: Empty file
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-6
- Input: Non empty file
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-7
- Input: Existing irrigation basin name
- Result: Error. "Tried to record an irrigation basin with an existing name"
-
Equivalence class: HDSS-FN2-EQ-8
- Input: Non existing irrigation basin name
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-9
- Input: Under 50 chars irrigation basin name "shortName"
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-10
- Input: Over 50 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyreallyLongName"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-11
- Input: No irrigation basin name found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-12
- Input: Two or more irrigation basin names found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-13
- Input: One irrigation basin name found
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-14
- Input: No resources list found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-15
- Input: Two or more resources lists found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-16
- Input: One resources list found
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-17
- Input: Existing resource name
- Result: Error. "Tried to record a resource basin with an existing name"
-
Equivalence class: HDSS-FN2-EQ-18
- Input: Non existing resource name
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-19
- Input: Under 50 chars resource basin name "shortName"
- Result: valid case
-
Equivalence class: HDSS-FN2-EQ-20
- Input: Over 50 chars resource name "reallyreallyreallyreallyreallyreallyreallyreallyLongName"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-21
- Input: No resource name found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-22
- Input: Two or more resource names found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-23
- Input: One resource basin name found
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-24
- Input: Resource type value = "Reservoir"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-25
- Input: Resource type value = "Desalination plant"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-26
- Input: Resource type value = "Aquifer"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-27
- Input: Resource type value = "My mom"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-28
- Input: No resource type found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-29
- Input: Two or more resource types found
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-30
- Input: One resource basin type found
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-31
- Input: Negative capacity
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-32
- Input: Positive capacity
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-33
- Input: Capacity values is not a number "word"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-34
- Input: Capacity values is a number "2.23"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-35
- Input: Capacity values is a number with more than 2 decimals "2.231"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-36
- Input: Capacity values is a number with 2 or less decimals "2.23"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-37
- Input: No capacity found and resource type is not "aquifer"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-38
- Input: Two or more capacity values found and resource type is not "aquifer"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-39
- Input: One capacity value found and resource type is not "aquifer"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-40
- Input: No capacity found and resource type is "aquifer"
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-41
- Input: One or more capacity values found and resource type is "aquifer"
- Result: Error: "The input file has no data or does not match the expected format"
-
Equivalence class: HDSS-FN2-EQ-42
- Input: One "reservoir" resource over 90% of capacity (PLENTY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-43
- Input: One "desalination plant" resource over 90% of capacity (PLENTY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-44
- Input: One "aquifer" resource over sea level capacity (PLENTY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-45
- Input: One resource of each type with capacities over 90% (PLENTY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-46
- Input: One "reservoir" resource between 40% and 90% of capacity (NORMALITY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-47
- Input: One "desalination plant" resource between 40% and 90% of capacity (NORMALITY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-48
- Input: One "aquifer" resource between -8 meters and sea level (NORMALITY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-49
- Input: One resource of each type with capacities between 40% and 90% (NORMALITY)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-50
- Input: One "reservoir" resource with capacity below 40% (SHORTAGE)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-51
- Input: One "desalination plant" resource with capacity below 40% (SHORTAGE)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-52
- Input: One "aquifer" resource with level below -8 meters (SHORTAGE)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-53
- Input: One resource of each type with capacities below 40% (SHORTAGE)
- Result: Valid case
-
Equivalence class: HDSS-FN2-EQ-54
- Input: One "reservoir" type with percentage over 100%
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN2-BL-1
- Input: 49 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyLongNam"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-2
- Input: 50 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyLongName"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-3
- Input: 51 chars irrigation basin name "reallyreallyreallyreallyreallyreallyreallyLongNamee"
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN2-BL-4
- Input: 49 chars resource name "reallyreallyreallyreallyreallyreallyreallyLongNam"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-5
- Input: 50 chars resource name "reallyreallyreallyreallyreallyreallyreallyLongName"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-6
- Input: 51 chars resource name "reallyreallyreallyreallyreallyreallyreallyLongNamee"
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN2-BL-7
- Input: Capacity value 0.00
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-8
- Input: Capacity value 0.01
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-9
- Input: Capacity value -0.01
- Result: Error: "The input file has no data or does not match the expected format"
-
Boundary limit: HDSS-FN2-BL-10
- Input capacity: capacity with 2 decimals "2.23"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-11
- Input capacity: capacity with 1 decimal "2.2"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-12
- Input capacity: capacity with no decimals "2"
- Result: valid case
-
Boundary limit: HDSS-FN2-BL-13
- Input capacity: capacity with 3 decimal "2.223"
- Result: Error: "The input file has no data or does not match the expected format"
- Equivalence classes considered: HDSS-FN2-EQ-2, HDSS-FN2-EQ-3, HDSS-FN2-EQ-6, HDSS-FN2-EQ-8, HDSS-FN2-EQ-9, HDSS-FN2-EQ-13, HDSS-FN2-EQ-16, HDSS-FN2-EQ-18, HDSS-FN2-EQ-19, HDSS-FN2-EQ-23, HDSS-FN2-EQ-24, HDSS-FN2-EQ-25, HDSS-FN2-EQ-26, HDSS-FN2-EQ-30, HDSS-FN2-EQ-32, HDSS-FN2-EQ-34, HDSS-FN2-EQ-36, HDSS-FN2-EQ-39, HDSS-FN2-EQ-40
- Input:
- Filename: "hdss-rf02-validRegisterHydricResourcesCase.json"
- Expected output: "hdss-rf02-expectedValidRegisterHydricResourcesCase.json"
- Equivalence class considered: HDSS-FN2-EQ-1
- Input:
- Filename "nonexists.json"
- Expected output: Throws Exception. Error message: "An input data file is not found"
- Boundary limit considered: HDSS-FN2-BL-7
- Input:
- Filename "hdss-rf02-capacityZero.json"
- Expected output: "hdss-rf02-expectedCapacityZero.json"
- Equivalence class considered: HDSS-FN2-EQ-4
- Input:
- Filename "hdss-rf02-invalidJson.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-5
- Input:
- Filename "hdss-rf02-empty.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-7
- Input:
- Filename "hdss-rf02-existingIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "Tried to record an irrigation basin with an existing name"
- Equivalence class considered: HDSS-FN2-EQ-10
- Input:
- Filename "hdss-rf02-longIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-11
- Input:
- Filename "hdss-rf02-noIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-12
- Input:
- Filename "hdss-rf02-severalIrrigationBasinNames.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-14
- Input:
- Filename "hdss-rf02-noResourcesList.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-15
- Input:
- Filename "hdss-rf02-severalResourcesLists.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-17
- Input:
- Filename "hdss-rf02-existingResourceName.json"
- Expected output: Throws Exception. Error message: "Tried to record a resource basin with an existing name"
- Equivalence class considered: HDSS-FN2-EQ-20
- Input:
- Filename "hdss-rf02-longResourceName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-21
- Input:
- Filename "hdss-rf02-noResourceName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-22
- Input:
- Filename "hdss-rf02-severalResourceNames.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-27
- Input:
- Filename "hdss-rf02-invalidResourceType.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-28
- Input:
- Filename "hdss-rf02-noResourceType.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-29
- Input:
- Filename "hdss-rf02-severalResourceTypes.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-31
- Input:
- Filename "hdss-rf02-negativeResourceCapacity.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-33
- Input:
- Filename "hdss-rf02-notValidResourceCapacity.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-35
- Input:
- Filename "hdss-rf02-notValidResourceCapacityDecimalFormat.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-37
- Input:
- Filename "hdss-rf02-noCapacityNotAquifer.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-38
- Input:
- Filename "hdss-rf02-severalCapacityValuesNotAquifer.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-41
- Input:
- Filename "hdss-rf02-capacityFoundAquifer.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN2-BL-1
- Input:
- Filename "hdss-rf02-validIrrigationBasinName49.json"
- Expected output: "hdss-rf02-expectedValidIrrigationBasinName49.json"
- Boundary limit considered: HDSS-FN2-BL-2
- Input:
- Filename "hdss-rf02-validIrrigationBasinName50.json"
- Expected output: "hdss-rf02-expectedValidIrrigationBasinName50.json"
- Boundary limit considered: HDSS-FN2-BL-3
- Input:
- Filename "hdss-rf02-invalidIrrigationBasinName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN2-BL-4
- Input:
- Filename "hdss-rf02-validResourceName49.json"
- Expected output: "hdss-rf02-expectedValidResourceName49.json"
- Boundary limit considered: HDSS-FN2-BL-5
- Input:
- Filename "hdss-rf02-validResourceName50.json"
- Expected output: "hdss-rf02-expectedValidResourceName50.json"
- Boundary limit considered: HDSS-FN2-BL-6
- Input:
- Filename "hdss-rf02-invalidResourceName.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN2-BL-8
- Input:
- Filename "hdss-rf02-validResourceCapacity0_01.json"
- Expected output: "hdss-rf02-expectedValidResourceCapacity0_01.json"
- Boundary limit considered: HDSS-FN2-BL-9
- Input:
- Filename "hdss-rf02-invalidResourceCapacity.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Boundary limit considered: HDSS-FN2-BL-10
- Input:
- Filename "hdss-rf02-validResourceCapacityTwoDecimals.json"
- Expected output: "hdss-rf02-expectedValidResourceCapacityTwoDecimals.json"
- Boundary limit considered: HDSS-FN2-BL-11
- Input:
- Filename "hdss-rf02-validResourceCapacityOneDecimal.json"
- Expected output: "hdss-rf02-expectedValidResourceCapacityOneDecimal.json"
- Boundary limit considered: HDSS-FN2-BL-12
- Input:
- Filename "hdss-rf02-validResourceCapacityZeroDecimals.json"
- Expected output: "hdss-rf02-expectedValidResourceCapacityZeroDecimals.json"
- Boundary limit considered: HDSS-FN2-BL-13
- Input:
- Filename "hdss-rf02-invalidResourceCapacityThreeDecimals.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
- Equivalence class considered: HDSS-FN2-EQ-42
- Input:
- Filename "hdss-rf02-validPlentyResources.json"
- Expected output: "hdss-rf02-expectedValidPlentyReservoir.json"
- Equivalence class considered: HDSS-FN2-EQ-43
- Input:
- Filename "hdss-rf02-validPlentyResources.json"
- Expected output: "hdss-rf02-expectedValidPlentyDesalinationPlant.json"
- Equivalence class considered: HDSS-FN2-EQ-44
- Input:
- Filename "hdss-rf02-validPlentyResources.json"
- Expected output: "hdss-rf02-expectedValidPlentyAquifer.json"
- Equivalence class considered: HDSS-FN2-EQ-45
- Input:
- Filename "hdss-rf02-validPlentyResources.json"
- Expected output: "hdss-rf02-expectedValidPlentyAll.json"
- Equivalence class considered: HDSS-FN2-EQ-46
- Input:
- Filename "hdss-rf02-validNormalityResources.json"
- Expected output: "hdss-rf02-expectedValidNormalityReservoir.json"
- Equivalence class considered: HDSS-FN2-EQ-47
- Input:
- Filename "hdss-rf02-validNormalityResources.json"
- Expected output: "hdss-rf02-expectedValidNormalityDesalinationPlant.json"
- Equivalence class considered: HDSS-FN2-EQ-48
- Input:
- Filename "hdss-rf02-validNormalityResources.json"
- Expected output: "hdss-rf02-expectedValidNormalityAquifer.json"
- Equivalence class considered: HDSS-FN2-EQ-49
- Input:
- Filename "hdss-rf02-validNormalityResources.json"
- Expected output: "hdss-rf02-expectedValidNormalityAll.json"
- Equivalence class considered: HDSS-FN2-EQ-50
- Input:
- Filename "hdss-rf02-validShortageResources.json"
- Expected output: "hdss-rf02-expectedValidShortageReservoir.json"
- Equivalence class considered: HDSS-FN2-EQ-51
- Input:
- Filename "hdss-rf02-validShortageResources.json"
- Expected output: "hdss-rf02-expectedValidShortageDesalinationPlant.json"
- Equivalence class considered: HDSS-FN2-EQ-52
- Input:
- Filename "hdss-rf02-validShortageResources.json"
- Expected output: "hdss-rf02-expectedValidShortageAquifer.json"
- Equivalence class considered: HDSS-FN2-EQ-53
- Input:
- Filename "hdss-rf02-validShortageResources.json"
- Expected output: "hdss-rf02-expectedValidShortageAll.json"
- Equivalence class considered: HDSS-FN2-EQ-54
- Input:
- Filename "hdss-rf02-invalidCapacityResources.json"
- Expected output: Throws Exception. Error message: "The input file has no data or does not match the expected format"
-
File::= Init_Object Body End_Object
-
Body::= Drainage_Basin Fields_Separator Requester Fields_Separator State Fields_Separator Amount Fields_Separator Irrigation_Date
-
Drainage_Basin::= Quotes Drainage_Basin_Label Quotes Label_Value_Separator Quotes Drainage_Basin_Value Quotes
-
Requester::= Quotes Requester_Label Quotes Label_Value_Separator Quotes Requester_Value Quotes
-
State::= Quotes State_Label Quotes Label_Value_Separator Quotes State_Value Quotes
-
Amount::= Quotes Amount_Label Quotes Label_Value_Separator Amount_Value
-
Irrigation_Date::= Quotes Irrigation_Date_Label Quotes Label_Value_Separator Quotes Irrigation_Date_Value Quotes
-
Drainage_Basin_Label::= 'Drainage Basin'
-
Requester_Label::= 'Requester'
-
State_Label::= 'State'
-
Amount_Label::= 'Amount'
-
Irrigation_Date_Label::= 'Irrigation Date'
-
Drainage_Basin_Value::= 1[Character]50
-
Requester_Value::= 1{Character}50
-
State_Value::= 'PLENTY'|'NORMALITY'|'SHORTAGE'
-
Amount_Value::= 1{Number}n Point 2{Number}2
-
Irrigation_Date_Value::= Date Hyphen Hour
-
Date::= '0'|'1'|'2'|'3' Number Bar '0'|'1' Number Bar 2{Number}2
-
Hour::= '0'|'1'|'2' Number Label_Value_Separator '0'|'1'|'2'|'3'|'4'|'5' Number
-
Fields_Separator::=','
-
Label_Value_Separator::=':'
-
Init_Object::='{'
-
End_Object::='}'
-
Quotes::= '"'
-
Bar::= '/'
-
Hyphen::= '-'
-
Point::= '.'
-
Character::='a'|'b'|'c'|...|'z'
-
Number::='0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'