Part of WiseFish Fishing and Quota - Test (automated tests) - Overview. 40 tests in 4 test codeunits (84006-84009), all passing on a BC28 container (16.11.2026). Folder src/Fishing; test library 84005 WiFiFQT Library - Fishing Trip and subscriber 84010 WiFiFQT Land FT Subscriber.
Tests landing a fishing trip: WiFiFQ Land Fishing Trip (codeunit 23014300) and WiFiFQ FTrip Trade Mgt (codeunit 23014302), added in WFFQ-151. See Landing Fishing Trips for how landing works.
84006 WiFiFQT Land FT Checks (11 tests)
The checks made before a trip is landed.
|
# |
Test |
Scenario |
Expected result |
|---|---|---|---|
|
01 |
|
A vessel marked Close FTrip without Landing. |
The trip is Settled, not landed, and the user is told so. |
|
02 |
|
The user says no when asked to land. |
The trip is still in Registration with Landing No. 0. |
|
03 |
|
A trip without a Raw Material Location. |
Error naming the Raw Material Location. |
|
04 |
|
A trip without a Product Location. |
Error naming the Product Location. |
|
05 |
|
A trip in a foreign currency without a currency factor. |
Error naming the currency factor and the currency. |
|
06 |
|
The trip has receiving transactions that are not flushed. |
Error: unflushed receiving transactions. |
|
07 |
|
The trip has Inbound to Fishing Trip entries that are not flushed. |
Error: unflushed Inbound to Fishing Trip entries. |
|
08 |
|
Dimension 1 is required and a raw material line doesn't have it. |
Error giving the number of lines and the dimension. |
|
09 |
|
Dimension 2 is required and a raw material line doesn't have it. |
Error giving the number of lines and the dimension. |
|
10 |
|
A production line in status Update. |
Error naming the trip, before the user is asked. |
|
11 |
|
A product line in status Update. |
Error naming the trip, before the user is asked. |
84007 WiFiFQT Land FT External (11 tests)
Landing a trip of an external (3rd party) vessel without a purchase document (Land FT for External Vessel = Land or Ask).
|
# |
Test |
Scenario |
Expected result |
|---|---|---|---|
|
01 |
|
Land FT for External Vessel = Land. |
The trip is Landed with Landing No. 1, without a purchase document. |
|
02 |
|
Lines without fish type, quantity or product, and a discarded line. |
The empty lines are deleted; the other lines and the discarded line are kept. |
|
03 |
|
A trip with a product line and a production line. |
Both get the trip's landing date and port, Line Landed and Landing No. 1. |
|
04 |
|
A trip with a budget line. |
The budget line's Trip Status is Landed. |
|
05 |
|
Some product lines have status Partial. |
The trip is Partially Landed; only the Partial lines are landed, not the budget line. |
|
06 |
|
A partial landing with a landing date after today. |
The lines are landed today; the trip's landing date is unchanged. Own vessels: WFFQ-157. |
|
07 |
|
A vessel with Post Quota at Landing. |
One Catch quota entry for the fish type, from the trip and vessel, on the landing date. |
|
08 |
|
A vessel without Post Quota at Landing. |
The trip is landed; no quota entry. |
|
09 |
|
A product line without a price; the user says no. |
Error naming the trip, the line and the product. |
|
10 |
|
Land FT for External Vessel = Ask; the user picks Just Land Trip. |
The menu offers invoice, order or just land; the trip is Landed. |
|
11 |
|
Land FT for External Vessel = Ask; the user cancels. |
Error: the trip was not landed. |
84008 WiFiFQT Land FT Purch Doc (9 tests)
Landing a trip of an external vessel to a purchase invoice or order (LandToPurchInv_u). This code commits, so the tests have a codeunit of their own. The vendor, items, locations and G/L account come from Microsoft's test libraries, so the purchase lines use the company's posting setup.
|
# |
Test |
Scenario |
Expected result |
|---|---|---|---|
|
01 |
|
Land FT for External Vessel = Invoice. |
A purchase invoice for the trip's vendor, opened on page 51, with an item line for the raw material line (quantity, cost + bonus price). |
|
02 |
|
Land FT for External Vessel = Order. |
A purchase order for the trip's vendor is created and opened. |
|
03 |
|
The trip has a vendor and the vessel has an owner vendor. |
The invoice is for the trip's vendor. |
|
04 |
|
The trip has no vendor. |
The invoice is for the vessel's owner. |
|
05 |
|
No trip vendor and no vessel owner. |
Error naming the vessel's Owners Vendor No. |
|
06 |
|
A raw material line with its own location and inbound lot code. |
The purchase line has the line's location and lot code. |
|
07 |
|
A raw material line with a budget line. |
Two item lines: the fisher's share without ACE fee, the company's share with it. |
|
08 |
|
A cost of the trip that posts to a G/L account. |
A G/L account line for the cost. |
|
09 |
|
A trip without raw material or product lines. |
Error: there are no fishing trip lines. |
84009 WiFiFQT Land FT Own Vessel (9 tests)
Landing a trip of an own vessel to inventory: the WiseFish TI journal lines. Subscriber 84010 copies each line on OnLandFishingTrip and stops the landing, so the lines are checked without being posted.
|
# |
Test |
Scenario |
Expected result |
|---|---|---|---|
|
01 |
|
A raw material line of an own vessel. |
A positive adjustment of trade items for the fish type, at the trip's location, stock center and processing stage. |
|
02 |
|
A raw material line with a negative quantity. |
A negative adjustment that closes the trade item as a credit. |
|
03 |
|
A negative quantity without Trade Item for Credit. |
Error naming the Trade Item for Credit. |
|
04 |
|
Deduct Guts from Inventory (WFFQ-98). |
Only the gutted quantity goes to inventory, at a unit cost that keeps the total value. |
|
05 |
|
A trip in a foreign currency. |
The unit amount is converted with the trip's currency factor. |
|
06 |
|
A raw material line with a size grade and no variant. |
A new variant of the fish type for the size grade. |
|
07 |
|
A size grade, no variant and no variant nos. |
Error: the variant is missing. |
|
08 |
|
A product line of an own vessel. |
A positive adjustment of trade items (boxes) for the product. |
|
09 |
|
No lines; the user says no to landing anyway. |
Error: the trip was not landed. |
Not covered
Landing corrections (LandCorrectedRawMat_u), automatic sales agreements at landing, and posting the TI journal to inventory. Open questions about landing are in WFFQ-152 (issues 8 and 9: WFFQ-157, WFFQ-158).