Sha256: 51eb2019757fcb13132ac22a164c824c8a30af606e41b137b2f533767253e064

Contents?: true

Size: 1.03 KB

Versions: 25

Compression:

Stored size: 1.03 KB

Contents

module WebService
  module Request
    require 'test_helper'
    class QueryTermTest < Test::Unit::TestCase
      def setup
        @isbn = "0143039008"
        @issn = "0090-5720"
        @title = "Travels with My Aunt"
        @author = "Graham Greene"
        @genre = "Book"
      end

      def test_set_attributes
        query_term = Exlibris::Primo::WebService::Request::QueryTerm.new()
        query_term.value = @isbn
        query_term.precision = "exact"
        query_term.index = "isbn"
        assert_equal "<QueryTerm><IndexField>isbn</IndexField>"+
          "<PrecisionOperator>exact</PrecisionOperator><Value>0143039008</Value></QueryTerm>", query_term.to_xml
      end

      def test_write_attributes
        query_term = Exlibris::Primo::WebService::Request::QueryTerm.new(:value => @isbn, :precision => "exact", :index => "isbn")
        assert_equal "<QueryTerm><IndexField>isbn</IndexField>"+
          "<PrecisionOperator>exact</PrecisionOperator><Value>0143039008</Value></QueryTerm>", query_term.to_xml
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
exlibris-primo-2.1.1 test/web_service/request/query_term_test.rb
exlibris-primo-2.1.0 test/web_service/request/query_term_test.rb
exlibris-primo-2.0.0 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.9 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.8 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.7 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.6 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.5 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.4 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.3 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.2 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.1 test/web_service/request/query_term_test.rb
exlibris-primo-1.1.0 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.11 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.10 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.9 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.8 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.7 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.6 test/web_service/request/query_term_test.rb
exlibris-primo-1.0.5 test/web_service/request/query_term_test.rb