diff --git a/ballerina/tests/stream_namespace_test.bal b/ballerina/tests/stream_namespace_test.bal index f62f4a03..d1ab0730 100644 --- a/ballerina/tests/stream_namespace_test.bal +++ b/ballerina/tests/stream_namespace_test.bal @@ -117,13 +117,13 @@ type CustomerFullNS record { prefix: "cust" } type CustomersFullNS record { - CustomerFull[] customer; + CustomerFullNS[] customer; }; @Name {value: "invoice"} type InvoiceFullNS record { - ProductsFull products; - CustomersFull customers; + ProductsFullNS products; + CustomersFullNS customers; }; # Test namespaces & prefixes with a record including all fields with annotations. @@ -131,7 +131,7 @@ type InvoiceFullNS record { # + return - return error on failure, otherwise nil. @test:Config function testNamespaceInvoiceFull() returns error? { - stream dataStream = check io:fileReadBlocksAsStream("tests/resources/default_namespaced_invoice.xml"); + stream dataStream = check io:fileReadBlocksAsStream("tests/resources/namespaced_invoice.xml"); InvoiceFullNS invoice = check fromXmlStringWithType(dataStream); test:assertEquals(invoice.length(), 2, "Invoice count mismatched"); @@ -143,9 +143,7 @@ function testNamespaceInvoiceFull() returns error? { test:assertEquals(invoice.products.product[0].length(), 5, "Product 1 field count mismatched"); test:assertEquals(invoice.products.product[0].id, 1); test:assertEquals(invoice.products.product[0].name, "Product 1"); - test:assertEquals(invoice.products.product[0].description, string `This is the description for - Product 1. - `); + test:assertEquals(invoice.products.product[0].description, string `This is the description for Product 1.`); test:assertEquals(invoice.products.product[0].price.length(), 2, "Price 1 price field count mismatched"); test:assertEquals(invoice.products.product[0].price.\#content, 57.70d); test:assertEquals(invoice.products.product[0].price.currency, "USD"); @@ -154,9 +152,7 @@ function testNamespaceInvoiceFull() returns error? { test:assertEquals(invoice.products.product[1].length(), 5, "Product 2 field count mismatched"); test:assertEquals(invoice.products.product[1].id, 2); test:assertEquals(invoice.products.product[1].name, "Product 2"); - test:assertEquals(invoice.products.product[1].description, string `This is the description for - Product 2. - `); + test:assertEquals(invoice.products.product[1].description, string `This is the description for Product 2.`); test:assertEquals(invoice.products.product[0].price.length(), 2, "Price 1 price field count mismatched"); test:assertEquals(invoice.products.product[1].price.\#content, 6312.36d); test:assertEquals(invoice.products.product[1].price.currency, "LKR");