Part of WiseFish Fishing and Quota - Test (automated tests) - Overview. 37 tests in 2 test codeunits (84001, 84002), all passing on a BC28 container (16.11.2026). Folder src/Quota; test library 84000 WiFiFQT Library - Quota.
Both codeunits test WiFiFQ Post Quota Log (codeunit 23014250). Unless stated: quota system Icelandic, quota rounding precision 0.01, GFE factor 1.5 and a line of 1000. Quantities are Recorded / Adjusted / Quota / Cod equivalent.
84001 WiFiFQT Quota Jnl Check (14 tests)
Tests the checks before a quota journal line is posted: CheckQuotaLines_u, and the permit and vessel checks in PostQuotaJnlLine_u per quota system.
|
# |
Test |
Scenario |
Expected result |
|---|---|---|---|
|
01 |
|
A Catch line with a quota year covering its date and a quota for its fish type in every area. |
No error. |
|
02 |
|
A line without fish type, dated outside every quota year. |
No error: the line is not checked (WFFQ-152 issue 4). |
|
03 |
|
A line with quantity 0, dated outside every quota year. |
No error: the line is not checked (WFFQ-152 issue 4). |
|
04 |
|
A line dated after the end of the quota year. |
No Quota Year is found, naming the quota system and date. |
|
05 |
|
The fish type belongs to a quota system without quota years. |
No Quota Year is found for that quota system. |
|
06 |
|
No Quota for Fish Types entry for the fish type. |
No Quota for Fish Types entry, naming quota year, fish type and area. |
|
07 |
|
A quota for area A only, and a line in area B. |
No Quota for Fish Types entry, naming area B. |
|
08 |
|
A quota for areas A|B, and a line in area B. |
No error. |
|
09 |
|
A quota with a blank area filter, and a line in some area. |
No error. |
|
10 |
|
A quota for area A only, and a line without area. |
No Quota for Fish Types entry for the blank area. |
|
11 |
|
Quota system W1, a line without permit code. |
Permit Code must have a value. |
|
12 |
|
Quota system New Zealand, a line without permit code. |
Permit Code must have a value. |
|
13 |
|
Quota system W1, a Catch line with a vessel that does not exist. |
Vessel not found, naming the vessel. |
|
14 |
|
Quota system Icelandic, a Purchased line with a vessel that does not exist. |
Vessel not found, naming the vessel. |
84002 WiFiFQT Quota Jnl Post (23 tests)
Tests posting: PostQuotaJnlLine_u (the quota entries, field by field) and OnRun (posting the journal, with its confirmations).
|
# |
Test |
Scenario |
Expected result |
|---|---|---|---|
|
01 |
|
Post a Catch line. |
One entry: -1000 / -1000 / -1000 / -1500, with the line's date, vessel, permit, quota year, entry date and user. |
|
02 |
|
Post an Allocation line with trip, equipment, size grade and export premium. |
+1000 / +1000 / +1000 / +1500; trip, equipment, size grade and export premium cleared. |
|
03 |
|
Post a Sold line without counterpart. |
One entry with negative quantities. |
|
04 |
|
Precision 1, an Allocation line of 1000.4. |
Recorded 1000. |
|
05 |
|
Precision 0, an Allocation line of 1000.6. |
Recorded 1001. |
|
06 |
|
An ungutted Catch line, factor ungutted to gutted 0.8. |
-1000 / -800 / -800 / -1200. |
|
07 |
|
A processing method with conversion factor 1.2. |
-1000 / -1200 / -1200 / -1800. |
|
08 |
|
A processing method without conversion factor, yield factor 1.25. |
-1000 / -1250 / -1250 / -1875. |
|
09 |
|
A processing method with neither factor. |
Conversion Factor must have a value. |
|
10 |
|
New Zealand, conversion factor 1.2. |
Adjusted and quota quantities equal the recorded 1000. |
|
11 |
|
New Zealand, a processing method without any factor. |
No quota entry. |
|
12 |
|
Fishing equipment with a 10 % quota discount covering the date. |
Quota -900, cod equivalent -1350. |
|
13 |
|
The same equipment with Maximum Obtained. |
Quota -1000, cod equivalent -1500. |
|
14 |
|
Export premium on the line, 10 % for the fish type. |
Quota -1100, cod equivalent -1650. |
|
15 |
|
A substandard size grade, 10 % allowance, substandard factor 0.5. |
Substandard, Substandard Qty -100, quota -950, cod equivalent -1425. |
|
16 |
|
Substandard for the raw material, not for the vessel. |
Not substandard; full count. |
|
17 |
|
Fixed substandard 10 %, no size grade. |
Substandard, Substandard Qty -100, quota -1000 (cod equivalent not checked, WFFQ-152 issue 6). |
|
18 |
|
A Rented line from another vessel and permit. |
+1000 entry, and a -1000 entry for the other vessel with vessels, permits and descriptions swapped. |
|
19 |
|
W1, a Rented line from another vessel without From Permit Code. |
From Permit Code must have a value. |
|
20 |
|
A Rented line with a budget document no. |
Budget doc. on the receiving entry only; the mirror entry has it in Description 2. |
|
21 |
|
Post a journal with an Allocation line and a Catch line on a trip; confirm. |
Both posted; the journal is empty. |
|
22 |
|
A Catch line without fishing trip; answer Yes twice. |
Asks to post anyway, then to post; posted, journal empty. |
|
23 |
|
A Catch line without fishing trip; answer No. |
Nothing posted; the journal line stays. |