-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for file read and convert xml to record
- Loading branch information
1 parent
57e9cc7
commit e84edb4
Showing
6 changed files
with
459 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<library> | ||
<book> | ||
<title>Harry Potter and the Philosopher's Stone</title> | ||
<author>J.K. Rowling</author> | ||
<genre>Fantasy</genre> | ||
<publication_year>1997</publication_year> | ||
</book> | ||
<book> | ||
<title>The Great Gatsby</title> | ||
<author>F. Scott Fitzgerald</author> | ||
<genre>Classic</genre> | ||
<publication_year>1925</publication_year> | ||
</book> | ||
<book> | ||
<title>To Kill a Mockingbird</title> | ||
<author>Harper Lee</author> | ||
<genre>Fiction</genre> | ||
<publication_year>1960</publication_year> | ||
</book> | ||
</library> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<movies> | ||
<movie id="1"> | ||
<title>American Beauty</title> | ||
<director>Sam Mendes</director> | ||
<genre>Drama</genre> | ||
<release_year>1999</release_year> | ||
</movie> | ||
<movie id="2"> | ||
<title>The Shawshank Redemption</title> | ||
<director>Frank Darabont</director> | ||
<genre>Drama</genre> | ||
<release_year>1994</release_year> | ||
</movie> | ||
<movie id="3"> | ||
<title>Forrest Gump</title> | ||
<director>Robert Zemeckis</director> | ||
<genre>Drama</genre> | ||
<release_year>1994</release_year> | ||
</movie> | ||
</movies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<library xmlns:bk="http://example.com/books" xmlns:auth="http://example.com/authors"> | ||
<bk:book id="1"> | ||
<bk:title>The Catcher in the Rye</bk:title> | ||
<bk:author id="101" auth:nationality="American"> | ||
<auth:first_name>J.D.</auth:first_name> | ||
<auth:last_name>Salinger</auth:last_name> | ||
</bk:author> | ||
<bk:genre>Fiction</bk:genre> | ||
<bk:publication_year>1951</bk:publication_year> | ||
</bk:book> | ||
<bk:book id="2"> | ||
<bk:title>1984</bk:title> | ||
<bk:author id="102" auth:nationality="British"> | ||
<auth:first_name>George</auth:first_name> | ||
<auth:last_name>Orwell</auth:last_name> | ||
</bk:author> | ||
<bk:genre>Dystopian</bk:genre> | ||
<bk:publication_year>1949</bk:publication_year> | ||
</bk:book> | ||
<bk:book id="3"> | ||
<bk:title>The Lord of the Rings</bk:title> | ||
<bk:author id="103" auth:nationality="British"> | ||
<auth:first_name>J.R.R.</auth:first_name> | ||
<auth:last_name>Tolkien</auth:last_name> | ||
</bk:author> | ||
<bk:genre>Fantasy</bk:genre> | ||
<bk:publication_year>1954</bk:publication_year> | ||
</bk:book> | ||
</library> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<orders xmlns="http://example.com/orders" xmlns:cust="http://example.com/customers" xmlns:prod="http://example.com/products"> | ||
<order order_id="123456" date="2024-03-22T10:30:00" cust:customer_id="987654"> | ||
<cust:customer_info> | ||
<cust:name>John Doe</cust:name> | ||
<cust:email>john.doe@example.com</cust:email> | ||
<cust:address> | ||
<cust:street>123 Main St</cust:street> | ||
<cust:city>Anytown</cust:city> | ||
<cust:state>CA</cust:state> | ||
<cust:zip>12345</cust:zip> | ||
<cust:country>USA</cust:country> | ||
</cust:address> | ||
</cust:customer_info> | ||
<products> | ||
<prod:product prod:product_id="789" prod:quantity="2"> | ||
<prod:name>Laptop</prod:name> | ||
<prod:price currency="USD">999.99</prod:price> | ||
</prod:product> | ||
<prod:product prod:product_id="456" prod:quantity="1"> | ||
<prod:name>Printer</prod:name> | ||
<prod:price currency="USD">199.99</prod:price> | ||
</prod:product> | ||
</products> | ||
<payment> | ||
<method>credit_card</method> | ||
<amount currency="USD">2199.97</amount> | ||
<card> | ||
<card_type>VISA</card_type> | ||
<card_number>1234 5678 9012 3456</card_number> | ||
<expiration_date>2026-12</expiration_date> | ||
</card> | ||
</payment> | ||
<status>completed</status> | ||
</order> | ||
<order order_id="789012" date="2024-03-22T11:45:00" cust:customer_id="543210"> | ||
<cust:customer_info> | ||
<cust:name>Jane Smith</cust:name> | ||
<cust:email>jane.smith@example.com</cust:email> | ||
<cust:address> | ||
<cust:street>456 Oak Ave</cust:street> | ||
<cust:city>Smalltown</cust:city> | ||
<cust:state>NY</cust:state> | ||
<cust:zip>54321</cust:zip> | ||
<cust:country>USA</cust:country> | ||
</cust:address> | ||
</cust:customer_info> | ||
<products> | ||
<prod:product prod:product_id="123" prod:quantity="3"> | ||
<prod:name>Smartphone</prod:name> | ||
<prod:price currency="USD">799.99</prod:price> | ||
</prod:product> | ||
<prod:product prod:product_id="234" prod:quantity="2"> | ||
<prod:name>Tablet</prod:name> | ||
<prod:price currency="USD">499.99</prod:price> | ||
</prod:product> | ||
<prod:product prod:product_id="345" prod:quantity="1"> | ||
<prod:name>Smart Watch</prod:name> | ||
<prod:price currency="USD">299.99</prod:price> | ||
</prod:product> | ||
</products> | ||
<payment> | ||
<method>paypal</method> | ||
<amount currency="USD">3499.94</amount> | ||
<paypal> | ||
<email>jane.smith@example.com</email> | ||
</paypal> | ||
</payment> | ||
<status>pending</status> | ||
</order> | ||
</orders> |
Oops, something went wrong.