New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elibri_onix_mocks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elibri_onix_mocks

  • 0.1.10
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status

Gem created for Mocking eLibri xml objects. More info coming soon.

Basic usage: Elibri::XmlMocks::Example.basic_product

methods to create mock objects: basic_product book_example onix_record_identifiers_example onix_product_form_example onix_epub_details_example onix_categories_example onix_languages_example onix_measurement_example onix_sale_restrictions_example onix_audience_range_example onix_publisher_info_example onix_subjects_example onix_edition_example onix_ebook_extent_example onix_audiobook_extent_example onix_no_contributors_example onix_collective_work_example onix_contributors_example onix_announced_product_example onix_preorder_product_example onix_published_product_example onix_out_of_print_product_example onix_titles_example onix_title_with_collection_example onix_texts_example onix_related_products_example onix_supply_details_example onix_series_memberships_example onix_supporting_resources_example onix_elibri_extensions_example contributor_mock review_mock supply_detail_mock imprint_mock description_mock

Each method take arguments in a hash form, where key is the name of attribute in mock object. Value can be string, array, another mock object - depend on situation.

For list of important attributes please look into lib/mocks/xml_mocks.rb file.

If you want to create eLibri xml from mock: Elibri::ONIX::XMLGenerator.new(mock_object).to_s

Creating product from xml: Elibri::ONIX::Release_3_0::ONIXMessage.from_xml(xml_string)

Therefore you can use it to test your api handling function - you will receive same xml from mock, as you will receive from actual elibri api (with different data ofc :))

FAQs

Package last updated on 21 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc