summaryrefslogtreecommitdiff
path: root/tests/test_helper.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-05 14:37:11 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-05 14:37:11 +0200
commit0a2b0e347d926ac0f29c9dd0f49e00634e822d0e (patch)
treef84ecc1e559227b1435f6647b36d150f4b101585 /tests/test_helper.cpp
parentcd827834f9ee329c27b82d987f0d1d48a854a954 (diff)
namespace administration
Diffstat (limited to 'tests/test_helper.cpp')
-rw-r--r--tests/test_helper.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/test_helper.cpp b/tests/test_helper.cpp
index 38aa655..f0b0d66 100644
--- a/tests/test_helper.cpp
+++ b/tests/test_helper.cpp
@@ -21,7 +21,7 @@ char* extract_dir = "build\\extracted";
static contact _create_nl_business()
{
- contact pw = administration_contact_create_empty();
+ contact pw = administration::contact_create_empty();
strops::copy(pw.name, "Dutch Company BV", sizeof(pw.name));
strops::copy(pw.address.address1, "Address 1", sizeof(pw.address.address1));
strops::copy(pw.address.country_code, "NL", sizeof(pw.address.country_code));
@@ -39,7 +39,7 @@ static contact _create_nl_business()
static contact _create_nl_consumer()
{
- contact pw = administration_contact_create_empty();
+ contact pw = administration::contact_create_empty();
strops::copy(pw.name, "Piet Pinda", sizeof(pw.name));
strops::copy(pw.address.address1, "Address 2", sizeof(pw.address.address1));
strops::copy(pw.address.country_code, "NL", sizeof(pw.address.country_code));
@@ -55,7 +55,7 @@ static contact _create_nl_consumer()
static billing_item _create_bi1(invoice *inv)
{
- billing_item item = administration_billing_item_create_empty();
+ billing_item item = administration::billing_item_create_empty();
item.amount = 1;
item.amount_is_percentage = 0;
strops::copy(item.description, "Shampoo", MAX_LEN_LONG_DESC);
@@ -65,7 +65,7 @@ static billing_item _create_bi1(invoice *inv)
tax_rate buffer[20];
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
- u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
+ u32 tax_rate_count = administration::tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
@@ -74,7 +74,7 @@ static billing_item _create_bi1(invoice *inv)
static billing_item _create_bi2(invoice *inv)
{
- billing_item item = administration_billing_item_create_empty();
+ billing_item item = administration::billing_item_create_empty();
item.amount = 2;
item.amount_is_percentage = 0;
strops::copy(item.description, "Soap", MAX_LEN_LONG_DESC);
@@ -84,7 +84,7 @@ static billing_item _create_bi2(invoice *inv)
tax_rate buffer[20];
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
- u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
+ u32 tax_rate_count = administration::tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
@@ -93,7 +93,7 @@ static billing_item _create_bi2(invoice *inv)
static billing_item _create_bi3(invoice *inv)
{
- billing_item item = administration_billing_item_create_empty();
+ billing_item item = administration::billing_item_create_empty();
item.amount = 1;
item.amount_is_percentage = 0;
strops::copy(item.description, "Guacamole", MAX_LEN_LONG_DESC);
@@ -103,7 +103,7 @@ static billing_item _create_bi3(invoice *inv)
tax_rate buffer[20];
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
- u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
+ u32 tax_rate_count = administration::tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
@@ -112,7 +112,7 @@ static billing_item _create_bi3(invoice *inv)
static billing_item _create_bi4(invoice *inv)
{
- billing_item item = administration_billing_item_create_empty();
+ billing_item item = administration::billing_item_create_empty();
item.amount = 3;
item.amount_is_percentage = 0;
strops::copy(item.description, "Bananas", MAX_LEN_LONG_DESC);
@@ -122,7 +122,7 @@ static billing_item _create_bi4(invoice *inv)
tax_rate buffer[20];
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
- u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
+ u32 tax_rate_count = administration::tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
@@ -131,7 +131,7 @@ static billing_item _create_bi4(invoice *inv)
static billing_item _create_bi5(invoice *inv)
{
- billing_item item = administration_billing_item_create_empty();
+ billing_item item = administration::billing_item_create_empty();
item.amount = 5;
item.amount_is_percentage = 0;
strops::copy(item.description, "Apple", MAX_LEN_LONG_DESC);
@@ -141,7 +141,7 @@ static billing_item _create_bi5(invoice *inv)
tax_rate buffer[20];
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
- u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
+ u32 tax_rate_count = administration::tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
@@ -150,7 +150,7 @@ static billing_item _create_bi5(invoice *inv)
static billing_item _create_bi6(invoice *inv)
{
- billing_item item = administration_billing_item_create_empty();
+ billing_item item = administration::billing_item_create_empty();
item.amount = 10;
item.amount_is_percentage = 1;
strops::copy(item.description, "Tip", MAX_LEN_LONG_DESC);
@@ -160,7 +160,7 @@ static billing_item _create_bi6(invoice *inv)
tax_rate buffer[20];
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
- u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
+ u32 tax_rate_count = administration::tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);