umlaut 3.0.0alpha10 → 3.0.0alpha11
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/collection.rb +7 -1
- data/app/models/referent.rb +11 -77
- data/app/models/request.rb +2 -2
- data/app/models/service_store.rb +4 -0
- data/app/models/service_wave.rb +1 -1
- data/lib/section_renderer.rb +9 -5
- data/lib/service.rb +0 -62
- data/lib/service_adaptors/isi.rb +1 -1
- data/lib/service_adaptors/jcr.rb +1 -1
- data/lib/umlaut/version.rb +1 -1
- data/lib/umlaut_configurable.rb +1 -0
- data/test/dummy/config/environments/profile.rb +24 -0
- data/test/dummy/config/primo.yml +271 -0
- data/test/dummy/config/umlaut_services-TEST.yml +37 -0
- data/test/dummy/profile/sfx_collection_prof.rb +22 -0
- data/test/dummy/tmp/cache/assets/C2A/410/sprockets%2Fd654b74912b4773a2534616863fb6565 +0 -0
- data/test/dummy/tmp/cache/assets/C45/A30/sprockets%2F39494895e462697b478d3d0c79298a26 +0 -0
- data/test/dummy/tmp/cache/assets/C5F/340/sprockets%2F99692920160b7a279b86a80415b79db7 +0 -0
- data/test/dummy/tmp/cache/assets/C70/4D0/sprockets%2F034ad2036e623081bd352800786dfe80 +0 -0
- data/test/dummy/tmp/cache/assets/C80/980/sprockets%2Fc94807409c1523d43e18d25f35d93c41 +0 -0
- data/test/dummy/tmp/cache/assets/{D0E/570/sprockets%2Fd4a16e3bdd7c7b9543c446b1b0174688 → CBD/730/sprockets%2F034c1086748b981c36672d5a56e7fed6} +0 -0
- data/test/dummy/tmp/cache/assets/CBF/B60/sprockets%2F08ca89671549936265dcb673bf02e36f +0 -0
- data/test/dummy/tmp/cache/assets/CC9/9F0/sprockets%2F306166316e2cafd13c15e62b51a2339d +0 -0
- data/test/dummy/tmp/cache/assets/CD6/300/sprockets%2F397ec39d3d883789effe506c38760368 +0 -0
- data/test/dummy/tmp/cache/assets/CD7/DD0/sprockets%2F4f1fe68aa2042a0970bde9b185530646 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CF7/2B0/sprockets%2F25a7c73655bd3598173b39d9f98bcd46 +0 -0
- data/test/dummy/tmp/cache/assets/CFE/080/sprockets%2F37fe9f4255baddbd549a659914929398 +0 -0
- data/test/dummy/tmp/cache/assets/{CE1/F50/sprockets%2F6e6b593b107866863500ba0fee5a9e24 → D16/F90/sprockets%2F5fe3c021048c6f9a6086bed7736d87b1} +0 -0
- data/test/dummy/tmp/cache/assets/{CDD/7D0/sprockets%2F60687bff4553a7f8c701bb9627a6200a → D24/360/sprockets%2F6987b047a96dc685ba3cf39b31477f6d} +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D37/2B0/sprockets%2F40834fb07d7318c1fddd5003bd9e04f6 +0 -0
- data/test/dummy/tmp/cache/assets/D43/0D0/sprockets%2F682843a8d0795a5fbcfeb2f0c81727d0 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D50/A30/sprockets%2F7d8b294ac433db5d056538f8cf7c66b9 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D6C/7D0/sprockets%2F8a05d6981ec0d38c51739bef0b3a9c2b +0 -0
- data/test/dummy/tmp/cache/assets/D94/FF0/sprockets%2F3b56a1aa77de0d570c38a4a9d5f4b1d6 +0 -0
- data/test/dummy/tmp/cache/assets/D97/6B0/sprockets%2Fb070e8c799d1a4ad5e62e0a1ae3b83e6 +0 -0
- data/test/dummy/tmp/cache/assets/DA6/A80/sprockets%2F92e26d8e58d5bcc8b8f6c25d1b05b9c1 +0 -0
- data/test/dummy/tmp/cache/assets/{DB7/BD0/sprockets%2Ff2c59778ab79dcfd3792f46f2ce82f2a → DC0/D20/sprockets%2F1ccf7405cd252dcec4bf23af82e2563a} +0 -0
- data/test/dummy/tmp/cache/assets/{D5C/B00/sprockets%2F2b7ac06cc680d7480c06b917bac5a6b0 → DD2/D80/sprockets%2Fc66d103807d0f971fbbcf9aa8b8b27ee} +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DE8/790/sprockets%2Fd1333bde2b9aafcc712d11dd09ab35d8 +0 -0
- data/test/dummy/tmp/cache/assets/DF5/5E0/sprockets%2F8e64a37c73cdc0b37a4ccfcb42ab45d8 +0 -0
- data/test/dummy/tmp/cache/assets/DF7/960/sprockets%2F99ac6db10b44a64fbba4ee847b35ba8b +0 -0
- data/test/dummy/tmp/cache/assets/{C84/A00/sprockets%2F3ba04c88513936081d59d8771f6804aa → DFC/040/sprockets%2F15ea81cf915c0cb1dfc9cc04c9fef364} +0 -0
- data/test/dummy/tmp/cache/assets/DFD/300/sprockets%2Fabac9489cf7f1db8ef00d72a1571ee1e +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E38/FE0/sprockets%2Fe1fc875efa817cbb94a5d8de25ea4e6b +0 -0
- data/test/dummy/tmp/cache/assets/E5F/960/sprockets%2Fdc007b6cad5c7ef08e33ec28cfff0ef6 +0 -0
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_gc_runs.csv +2 -0
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_gc_time.csv +2 -0
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_memory.csv +2 -0
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_objects.csv +2 -0
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_wall_time.csv +2 -0
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_flat.txt +11 -0
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_graph.html +303 -0
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_stack.html +546 -0
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_tree.txt +38 -0
- data/test/dummy/tmp/performance/empty.png +0 -0
- data/test/dummy/tmp/performance/minus.png +0 -0
- data/test/dummy/tmp/performance/plus.png +0 -0
- data/test/test_helper.rb +36 -0
- data/test/unit/aleph_patron_test.rb +40 -35
- data/test/unit/aleph_record_benchmarks.rb +28 -24
- data/test/unit/aleph_record_test.rb +31 -26
- data/test/unit/collection_test.rb +17 -18
- data/test/unit/google_book_search_test.rb +18 -44
- data/test/unit/primo_searcher_test.rb +325 -321
- data/test/unit/primo_service_test.rb +924 -919
- data/test/unit/primo_ws_test.rb +141 -138
- data/test/unit/service_test.rb +2 -16
- metadata +93 -100
- data/test/dummy/tmp/cache/assets/C73/920/sprockets%2Fd371318f22900492fd180f17c5e2a504 +0 -0
- data/test/dummy/tmp/cache/assets/C8F/780/sprockets%2Fe47e28558116fb5f8038754e60d1961d +0 -0
- data/test/dummy/tmp/cache/assets/CAA/EB0/sprockets%2F1d179210e8b76f1ea63c802688a015e4 +0 -9271
- data/test/dummy/tmp/cache/assets/CB2/DA0/sprockets%2Fa1808990b72376256db2ae3818c0e9b5 +0 -0
- data/test/dummy/tmp/cache/assets/CBB/9C0/sprockets%2F706f28923fb754cad04b9107c89986a1 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/680/sprockets%2F2b68ef632d12610f3c9563168bfa7c05 +0 -0
- data/test/dummy/tmp/cache/assets/CEA/2A0/sprockets%2F9c8607157b998108ce08f4aca39f810a +0 -0
- data/test/dummy/tmp/cache/assets/CF5/9B0/sprockets%2F7933bfe880731b396791f1682ce3f7fa +0 -0
- data/test/dummy/tmp/cache/assets/CFB/2F0/sprockets%2F62d51f0aa5cac4b1cf7091823772a604 +0 -0
- data/test/dummy/tmp/cache/assets/D22/060/sprockets%2F9aec77b768e91a802d284271c58e2f7e +0 -0
- data/test/dummy/tmp/cache/assets/D33/6D0/sprockets%2F500129c57f1146e556ec3aacd6cd38c1 +0 -0
- data/test/dummy/tmp/cache/assets/D33/FD0/sprockets%2F2ba0b4e6334a77b923e5f770381bb2bf +0 -0
- data/test/dummy/tmp/cache/assets/D4C/0A0/sprockets%2F7810d837eec3ac57ad78756af83a6a55 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/E30/sprockets%2F631abf89746799b7a5b2b3b4f6294bcd +0 -0
- data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -873
- data/test/dummy/tmp/cache/assets/D5D/AD0/sprockets%2Fbdb053d9a6a967788f09fbc555d69f58 +0 -0
- data/test/dummy/tmp/cache/assets/D66/890/sprockets%2F06287a78ed20d8214197eab03bfca5dd +0 -0
- data/test/dummy/tmp/cache/assets/D6B/2A0/sprockets%2F81f17ab0ed20f4a8d9355f7a1d872eb2 +0 -0
- data/test/dummy/tmp/cache/assets/D70/080/sprockets%2F24d3ce40ae5cc827a9183b1fb837e84e +0 -0
- data/test/dummy/tmp/cache/assets/D71/6B0/sprockets%2Fde558b71b494cf09b1bf055c8dff0353 +0 -0
- data/test/dummy/tmp/cache/assets/D72/610/sprockets%2Fa8c708eeb30ef93de34d755d4f45d023 +0 -0
- data/test/dummy/tmp/cache/assets/D74/4C0/sprockets%2F64fdf30f75592d6e45fcfc45a48d20a2 +0 -0
- data/test/dummy/tmp/cache/assets/D76/AD0/sprockets%2Fe2158cde93188cf5ab6457bc6d6602ec +0 -0
- data/test/dummy/tmp/cache/assets/D7A/E40/sprockets%2F9622ffcc499a57627cd1bb18fe31b8e4 +0 -11772
- data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
- data/test/dummy/tmp/cache/assets/D9B/770/sprockets%2F8aacf02eb7dbb0949704b28f27b87e0b +0 -0
- data/test/dummy/tmp/cache/assets/DF7/F30/sprockets%2F7bc16c4109b17fabe29f8ddbbf732d1c +0 -0
- data/test/dummy/tmp/cache/assets/E03/570/sprockets%2F493bdc0ac14cd4f57fdfe4253f992bde +0 -0
- data/test/dummy/tmp/cache/assets/E09/850/sprockets%2F4bf497a38ecfef660b2f0ebb852d5e9c +0 -0
- data/test/dummy/tmp/cache/assets/E0B/4B0/sprockets%2F7988df51a61c81ce6ede4a2d4c8cce4f +0 -377
- data/test/dummy/tmp/cache/assets/E6F/A00/sprockets%2Fd32bcea45ea04a6aaee95b3aa840cbab +0 -0
@@ -4,293 +4,295 @@ class PrimoSearcherTest < Test::Unit::TestCase
|
|
4
4
|
PNX_NS = {'pnx' => 'http://www.exlibrisgroup.com/xsd/primo/primo_nm_bib'}
|
5
5
|
SEARCH_NS = {'search' => 'http://www.exlibrisgroup.com/xsd/jaguar/search'}
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
@vid = @primo_definition["vid"]
|
30
|
-
@institution = @primo_definition["institution"]
|
31
|
-
@primo_holdings_doc_id = "nyu_aleph000062856"
|
32
|
-
@primo_rsrcs_doc_id = "nyu_aleph002895625"
|
33
|
-
@primo_tocs_doc_id = "nyu_aleph003149772"
|
34
|
-
@primo_dedupmrg_doc_id = "dedupmrg17343091"
|
35
|
-
@primo_test_checked_out_doc_id = "nyu_aleph000089771"
|
36
|
-
@primo_test_offsite_doc_id = "nyu_aleph002169696"
|
37
|
-
@primo_test_ill_doc_id = "nyu_aleph001502625"
|
38
|
-
@primo_test_diacritics1_doc_id = "nyu_aleph002975583"
|
39
|
-
@primo_test_diacritics2_doc_id = "nyu_aleph003205339"
|
40
|
-
@primo_test_diacritics3_doc_id = "nyu_aleph003365921"
|
41
|
-
@primo_test_journals1_doc_id = "nyu_aleph002895625"
|
42
|
-
@primo_invalid_doc_id = "thisIsNotAValidDocId"
|
43
|
-
@primo_test_problem_doc_id = "nyu_aleph000509288"
|
44
|
-
@primo_test_bug1361_id = "ebrroutebr10416506"
|
45
|
-
@primo_test_isbn = "0143039008"
|
46
|
-
@primo_test_title = "Travels with My Aunt"
|
47
|
-
@primo_test_author = "Graham Greene"
|
48
|
-
@primo_test_genre = "Book"
|
49
|
-
@primo_config = YAML.load_file("#{Rails.root}/config/primo.yml")
|
50
|
-
@searcher_setup = {
|
51
|
-
:base_url => @base_url,
|
52
|
-
:institution => @institution,
|
53
|
-
:vid => @vid,
|
54
|
-
:config => @primo_config
|
55
|
-
}
|
56
|
-
|
57
|
-
@searcher_setup_without_config = {
|
58
|
-
:base_url => @base_url,
|
59
|
-
:institution => @institution,
|
60
|
-
:vid => @vid
|
61
|
-
}
|
62
|
-
end
|
63
|
-
|
64
|
-
# def test_primo_searcher_benchmarks
|
65
|
-
# Benchmark.bmbm do |results|
|
66
|
-
# results.report("Primo Searcher:") {
|
67
|
-
# (1..10).each {
|
68
|
-
# searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
69
|
-
# }
|
70
|
-
# }
|
71
|
-
# searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
72
|
-
# results.report("Searcher#process_record") {
|
73
|
-
# (1..10).each {
|
74
|
-
# searcher.send(:process_record)
|
75
|
-
# }
|
76
|
-
# }
|
77
|
-
# results.report("Searcher#process_search_results") {
|
78
|
-
# (1..10).each {
|
79
|
-
# searcher.send(:process_search_results)
|
80
|
-
# }
|
81
|
-
# }
|
82
|
-
# end
|
83
|
-
# end
|
84
|
-
|
85
|
-
# Test search for a single Primo document.
|
86
|
-
def test_search_by_doc_id
|
87
|
-
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
88
|
-
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
89
|
-
search_results = searcher.response
|
90
|
-
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
91
|
-
assert_equal(@primo_holdings_doc_id, search_results.at("//pnx:control/pnx:recordid", PNX_NS).inner_text, "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
92
|
-
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for doc id: #{@primo_holdings_doc_id}.")
|
93
|
-
end
|
94
|
-
|
95
|
-
# Test search for a Primo problem record
|
96
|
-
def test_search_by_genre_discrepancy
|
97
|
-
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_test_problem_doc_id})
|
98
|
-
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
99
|
-
search_results = searcher.response
|
100
|
-
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
101
|
-
assert_equal(@primo_test_problem_doc_id, search_results.at("//pnx:control/pnx:recordid", PNX_NS).inner_text, "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
102
|
-
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for doc id: #{@primo_test_problem_doc_id}.")
|
103
|
-
assert_equal(1, searcher.holdings.length, "#{searcher.class} returned unexpected holdings")
|
104
|
-
end
|
105
|
-
|
106
|
-
def test_search_by_bug1361
|
107
|
-
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_test_bug1361_id})
|
108
|
-
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
109
|
-
search_results = searcher.response
|
110
|
-
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
111
|
-
assert_equal(@primo_test_bug1361_id, search_results.at("//pnx:control/pnx:recordid", PNX_NS).inner_text, "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
112
|
-
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for doc id: #{@primo_test_bug1361_id}.")
|
113
|
-
assert_equal(0, searcher.holdings.length, "#{searcher.class} returned unexpected holdings")
|
114
|
-
assert_equal(4, searcher.rsrcs.length, "#{searcher.class} returned unexpected rsrcs")
|
115
|
-
end
|
116
|
-
|
117
|
-
# Test search for an invalid Primo document.
|
118
|
-
def test_search_by_invalid_doc_id
|
119
|
-
assert_raise(RuntimeError) {
|
120
|
-
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_invalid_doc_id})
|
121
|
-
}
|
122
|
-
end
|
7
|
+
nyu_only_tests(self.name) do
|
8
|
+
|
9
|
+
def setup
|
10
|
+
@primo_definition = YAML.load( %{
|
11
|
+
type: PrimoService
|
12
|
+
priority: 2 # After SFX, to get SFX metadata enhancement
|
13
|
+
status: active
|
14
|
+
base_url: http://bobcat.library.nyu.edu
|
15
|
+
vid: NYU
|
16
|
+
institution: NYU
|
17
|
+
holding_search_institution: NYU
|
18
|
+
holding_search_text: Search for this title in BobCat.
|
19
|
+
suppress_holdings: [ !ruby/regexp '/\$\$LBWEB/', !ruby/regexp '/\$\$LNWEB/', !ruby/regexp '/\$\$LTWEB/', !ruby/regexp '/\$\$LWEB/', !ruby/regexp '/\$\$1Restricted Internet Resources/' ]
|
20
|
+
ez_proxy: !ruby/regexp '/https\:\/\/ezproxy\.library\.nyu\.edu\/login\?url=/'
|
21
|
+
service_types:
|
22
|
+
- primo_source
|
23
|
+
- holding_search
|
24
|
+
- fulltext
|
25
|
+
- table_of_contents
|
26
|
+
- referent_enhance
|
27
|
+
- cover_image
|
28
|
+
})
|
123
29
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
30
|
+
@base_url = @primo_definition["base_url"]
|
31
|
+
@vid = @primo_definition["vid"]
|
32
|
+
@institution = @primo_definition["institution"]
|
33
|
+
@primo_holdings_doc_id = "nyu_aleph000062856"
|
34
|
+
@primo_rsrcs_doc_id = "nyu_aleph002895625"
|
35
|
+
@primo_tocs_doc_id = "nyu_aleph003149772"
|
36
|
+
@primo_dedupmrg_doc_id = "dedupmrg17343091"
|
37
|
+
@primo_test_checked_out_doc_id = "nyu_aleph000089771"
|
38
|
+
@primo_test_offsite_doc_id = "nyu_aleph002169696"
|
39
|
+
@primo_test_ill_doc_id = "nyu_aleph001502625"
|
40
|
+
@primo_test_diacritics1_doc_id = "nyu_aleph002975583"
|
41
|
+
@primo_test_diacritics2_doc_id = "nyu_aleph003205339"
|
42
|
+
@primo_test_diacritics3_doc_id = "nyu_aleph003365921"
|
43
|
+
@primo_test_journals1_doc_id = "nyu_aleph002895625"
|
44
|
+
@primo_invalid_doc_id = "thisIsNotAValidDocId"
|
45
|
+
@primo_test_problem_doc_id = "nyu_aleph000509288"
|
46
|
+
@primo_test_bug1361_id = "ebrroutebr10416506"
|
47
|
+
@primo_test_isbn = "0143039008"
|
48
|
+
@primo_test_title = "Travels with My Aunt"
|
49
|
+
@primo_test_author = "Graham Greene"
|
50
|
+
@primo_test_genre = "Book"
|
51
|
+
@primo_config = YAML.load_file("#{Rails.root}/config/primo.yml")
|
52
|
+
@searcher_setup = {
|
53
|
+
:base_url => @base_url,
|
54
|
+
:institution => @institution,
|
55
|
+
:vid => @vid,
|
56
|
+
:config => @primo_config
|
57
|
+
}
|
130
58
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
59
|
+
@searcher_setup_without_config = {
|
60
|
+
:base_url => @base_url,
|
61
|
+
:institution => @institution,
|
62
|
+
:vid => @vid
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# def test_primo_searcher_benchmarks
|
67
|
+
# Benchmark.bmbm do |results|
|
68
|
+
# results.report("Primo Searcher:") {
|
69
|
+
# (1..10).each {
|
70
|
+
# searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
71
|
+
# }
|
72
|
+
# }
|
73
|
+
# searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
74
|
+
# results.report("Searcher#process_record") {
|
75
|
+
# (1..10).each {
|
76
|
+
# searcher.send(:process_record)
|
77
|
+
# }
|
78
|
+
# }
|
79
|
+
# results.report("Searcher#process_search_results") {
|
80
|
+
# (1..10).each {
|
81
|
+
# searcher.send(:process_search_results)
|
82
|
+
# }
|
83
|
+
# }
|
84
|
+
# end
|
85
|
+
# end
|
137
86
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
assert_equal("NYU", first_holding.institution, "#{searcher.class} first holding has an unexpected institution: #{first_holding.institution}")
|
148
|
-
assert_equal("BOBST", first_holding.library, "#{searcher.class} first holding has an unexpected library: #{first_holding.library}")
|
149
|
-
assert_equal("Main Collection", first_holding.collection, "#{searcher.class} first holding has an unexpected collection: #{first_holding.collection}")
|
150
|
-
assert_equal("(PR6013.R44 T7 2004 )", first_holding.call_number, "#{searcher.class} first holding has an unexpected call number: #{first_holding.call_number}")
|
151
|
-
end
|
87
|
+
# Test search for a single Primo document.
|
88
|
+
def test_search_by_doc_id
|
89
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
90
|
+
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
91
|
+
search_results = searcher.response
|
92
|
+
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
93
|
+
assert_equal(@primo_holdings_doc_id, search_results.at("//pnx:control/pnx:recordid", PNX_NS).inner_text, "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
94
|
+
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for doc id: #{@primo_holdings_doc_id}.")
|
95
|
+
end
|
152
96
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
97
|
+
# Test search for a Primo problem record
|
98
|
+
def test_search_by_genre_discrepancy
|
99
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_test_problem_doc_id})
|
100
|
+
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
101
|
+
search_results = searcher.response
|
102
|
+
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
103
|
+
assert_equal(@primo_test_problem_doc_id, search_results.at("//pnx:control/pnx:recordid", PNX_NS).inner_text, "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
104
|
+
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for doc id: #{@primo_test_problem_doc_id}.")
|
105
|
+
assert_equal(1, searcher.holdings.length, "#{searcher.class} returned unexpected holdings")
|
106
|
+
end
|
107
|
+
|
108
|
+
def test_search_by_bug1361
|
109
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_test_bug1361_id})
|
110
|
+
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
111
|
+
search_results = searcher.response
|
112
|
+
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
113
|
+
assert_equal(@primo_test_bug1361_id, search_results.at("//pnx:control/pnx:recordid", PNX_NS).inner_text, "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
114
|
+
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for doc id: #{@primo_test_bug1361_id}.")
|
115
|
+
assert_equal(0, searcher.holdings.length, "#{searcher.class} returned unexpected holdings")
|
116
|
+
assert_equal(4, searcher.rsrcs.length, "#{searcher.class} returned unexpected rsrcs")
|
161
117
|
end
|
162
|
-
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for ISBN: #{@primo_test_isbn}.")
|
163
|
-
end
|
164
118
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
171
|
-
search_results.search("//search/issn") do |isbn|
|
172
|
-
assert_not_nil(isbn.inner_text.match("0002-8614"), "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
119
|
+
# Test search for an invalid Primo document.
|
120
|
+
def test_search_by_invalid_doc_id
|
121
|
+
assert_raise(RuntimeError) {
|
122
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_invalid_doc_id})
|
123
|
+
}
|
173
124
|
end
|
174
|
-
|
175
|
-
|
125
|
+
|
126
|
+
# Test invalid setup.
|
127
|
+
def test_search_by_invalid_setup1
|
128
|
+
assert_raise(RuntimeError) {
|
129
|
+
searcher = Exlibris::Primo::Searcher.new({}, {:primo_id => @primo_invalid_doc_id})
|
130
|
+
}
|
131
|
+
end
|
132
|
+
|
133
|
+
# Test invalid setup.
|
134
|
+
def test_search_by_invalid_setup2
|
135
|
+
assert_raise(RuntimeError) {
|
136
|
+
searcher = Exlibris::Primo::Searcher.new({:base_url => @base_url, :config => nil}, {:primo_id => @primo_invalid_doc_id})
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
# Test base setup search for a single Primo document.
|
141
|
+
def test_search_base_setup_record_id
|
142
|
+
searcher = Exlibris::Primo::Searcher.new({:base_url => @base_url, :institution => @institution}, {:primo_id => @primo_holdings_doc_id})
|
143
|
+
holdings = searcher.holdings
|
144
|
+
assert_instance_of(Array, holdings, "#{searcher.class} holdings is an unexpected object: #{holdings.class}")
|
145
|
+
assert(holdings.count > 0, "#{searcher.class} returned 0 holdings for doc id: #{@primo_holdings_doc_id}.")
|
146
|
+
first_holding = holdings.first
|
147
|
+
assert_instance_of(Exlibris::Primo::Holding, first_holding, "#{searcher.class} first holding is an unexpected object: #{first_holding.class}")
|
148
|
+
assert_equal("check_holdings", first_holding.status, "#{searcher.class} first holding has an unexpected status: #{first_holding.status}")
|
149
|
+
assert_equal("NYU", first_holding.institution, "#{searcher.class} first holding has an unexpected institution: #{first_holding.institution}")
|
150
|
+
assert_equal("BOBST", first_holding.library, "#{searcher.class} first holding has an unexpected library: #{first_holding.library}")
|
151
|
+
assert_equal("Main Collection", first_holding.collection, "#{searcher.class} first holding has an unexpected collection: #{first_holding.collection}")
|
152
|
+
assert_equal("(PR6013.R44 T7 2004 )", first_holding.call_number, "#{searcher.class} first holding has an unexpected call number: #{first_holding.call_number}")
|
153
|
+
end
|
154
|
+
|
155
|
+
# Test search by isbn.
|
156
|
+
def test_search_by_isbn
|
157
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:isbn => @primo_test_isbn})
|
158
|
+
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
159
|
+
search_results = searcher.response
|
160
|
+
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
161
|
+
search_results.search("//search/isbn") do |isbn|
|
162
|
+
assert_not_nil(isbn.inner_text.match(@primo_test_isbn), "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
163
|
+
end
|
164
|
+
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for ISBN: #{@primo_test_isbn}.")
|
165
|
+
end
|
166
|
+
|
167
|
+
# Test search by isbn.
|
168
|
+
def test_search_by_issn
|
169
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup_without_config, {:issn => "0002-8614"})
|
170
|
+
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
171
|
+
search_results = searcher.response
|
172
|
+
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
173
|
+
search_results.search("//search/issn") do |isbn|
|
174
|
+
assert_not_nil(isbn.inner_text.match("0002-8614"), "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
175
|
+
end
|
176
|
+
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for ISSN: 0002-8614.")
|
177
|
+
end
|
178
|
+
|
179
|
+
# Test search by title/author/genre.
|
180
|
+
def test_search_by_title_author_genre
|
181
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:title => @primo_test_title, :author => @primo_test_author, :genre => @primo_test_genre})
|
182
|
+
assert_not_nil(searcher, "#{searcher.class} returned nil when instantiated.")
|
183
|
+
search_results = searcher.response
|
184
|
+
assert_instance_of(Nokogiri::XML::Document, search_results, "#{searcher.class} search result is an unexpected object: #{search_results.class}")
|
185
|
+
search_results.search("//search/title") do |title|
|
186
|
+
assert_not_nil(title.inner_text.downcase.match(@primo_test_title.downcase), "#{searcher.class} returned an unexpected record: #{search_results.to_xml(:indent => 5, :encoding => 'UTF-8')}")
|
187
|
+
end
|
188
|
+
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for Title: #{@primo_test_title}.")
|
189
|
+
end
|
190
|
+
|
191
|
+
# Test search for a single Primo document w/ holdings.
|
192
|
+
def test_holdings
|
193
|
+
searcher = Exlibris::Primo::Searcher.new(@searcher_setup, {:primo_id => @primo_holdings_doc_id})
|
194
|
+
holdings = searcher.holdings
|
195
|
+
assert_instance_of(Array, holdings,
|
196
|
+
"#{searcher.class} holdings is an unexpected object: #{holdings.class}")
|
197
|
+
assert_equal(1, holdings.count,
|
198
|
+
"#{searcher.class} returned 0 holdings for doc id: #{@primo_holdings_doc_id}.")
|
199
|
+
first_holding = holdings.first
|
200
|
+
assert_instance_of(
|
201
|
+
Exlibris::Primo::Holding,
|
202
|
+
first_holding,
|
203
|
+
"#{searcher.class} first holding is an unexpected object: #{first_holding.class}")
|
204
|
+
test_data = {
|
205
|
+
:record_id => "nyu_aleph000062856",
|
206
|
+
:source_id => "nyu_aleph",
|
207
|
+
:original_source_id => "NYU01",
|
208
|
+
:source_record_id => "000062856",
|
209
|
+
:institution_code => "NYU",
|
210
|
+
:institution => "NYU",
|
211
|
+
:library_code => "BOBST",
|
212
|
+
:library => "NYU Bobst",
|
213
|
+
:status_code => "check_holdings",
|
214
|
+
:status => "Check Availability",
|
215
|
+
:id_one => "Main Collection",
|
216
|
+
:id_two => "(PR6013.R44 T7 2004 )",
|
217
|
+
:collection => "Main Collection",
|
218
|
+
:call_number => "(PR6013.R44 T7 2004 )",
|
219
|
+
:origin => nil,
|
220
|
+
:display_type => "book",
|
221
|
+
:coverage => [],
|
222
|
+
:notes => "",
|
223
|
+
:url => "#{@base_url}/primo_library/libweb/action/dlDisplay.do?docId=nyu_aleph000062856&institution=NYU&vid=#{@vid}",
|
224
|
+
:request_url => nil,
|
225
|
+
:match_reliability => ServiceResponse::MatchExact,
|
226
|
+
:request_link_supports_ajax_call => false }
|
227
|
+
test_data.each { |key, value|
|
228
|
+
assert_equal(
|
229
|
+
value,
|
230
|
+
first_holding.send(key),
|
231
|
+
"#{searcher.class} first holding has an unexpected #{key}: #{first_holding.send(key)}")
|
232
|
+
}
|
233
|
+
end
|
234
|
+
|
176
235
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
236
|
+
# Test search for a single Primo document w/ rsrcs.
|
237
|
+
def test_rsrcs
|
238
|
+
searcher = Exlibris::Primo::Searcher.new(
|
239
|
+
@searcher_setup,
|
240
|
+
{ :primo_id => @primo_rsrcs_doc_id })
|
241
|
+
rsrcs = searcher.rsrcs
|
242
|
+
assert_instance_of(Array, rsrcs,
|
243
|
+
"#{searcher.class} rsrcs is an unexpected object: #{rsrcs.class}")
|
244
|
+
assert_equal(2, rsrcs.count,
|
245
|
+
"#{searcher.class} returned an unexpected amount of rsrcs (#{rsrcs.count}) for doc id: #{@primo_rsrcs_doc_id}.")
|
246
|
+
first_rsrc = rsrcs.first
|
247
|
+
assert_instance_of(
|
248
|
+
Exlibris::Primo::Rsrc,
|
249
|
+
first_rsrc,
|
250
|
+
"#{searcher.class} first rsrc is an unexpected object: #{first_rsrc.class}")
|
251
|
+
test_data = {
|
252
|
+
:record_id => "nyu_aleph002895625",
|
253
|
+
:v => nil,
|
254
|
+
:url => "https://ezproxy.library.nyu.edu/login?url=http://mq.oxfordjournals.org/",
|
255
|
+
:display => "Online Version",
|
256
|
+
:institution_code => "NYU",
|
257
|
+
:origin => nil,
|
258
|
+
:notes => "" }
|
259
|
+
test_data.each { |key, value|
|
260
|
+
assert_equal(
|
261
|
+
value,
|
262
|
+
first_rsrc.send(key),
|
263
|
+
"#{searcher.class} first rsrc has an unexpected #{key}: #{first_rsrc.send(key)}")
|
264
|
+
}
|
185
265
|
end
|
186
|
-
assert(searcher.count.to_i > 0, "#{searcher.class} returned 0 results for Title: #{@primo_test_title}.")
|
187
|
-
end
|
188
266
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
:source_id => "nyu_aleph",
|
205
|
-
:original_source_id => "NYU01",
|
206
|
-
:source_record_id => "000062856",
|
207
|
-
:institution_code => "NYU",
|
208
|
-
:institution => "NYU",
|
209
|
-
:library_code => "BOBST",
|
210
|
-
:library => "NYU Bobst",
|
211
|
-
:status_code => "check_holdings",
|
212
|
-
:status => "Check Availability",
|
213
|
-
:id_one => "Main Collection",
|
214
|
-
:id_two => "(PR6013.R44 T7 2004 )",
|
215
|
-
:collection => "Main Collection",
|
216
|
-
:call_number => "(PR6013.R44 T7 2004 )",
|
217
|
-
:origin => nil,
|
218
|
-
:display_type => "book",
|
219
|
-
:coverage => [],
|
220
|
-
:notes => "",
|
221
|
-
:url => "#{@base_url}/primo_library/libweb/action/dlDisplay.do?docId=nyu_aleph000062856&institution=NYU&vid=#{@vid}",
|
222
|
-
:request_url => nil,
|
223
|
-
:match_reliability => ServiceResponse::MatchExact,
|
224
|
-
:request_link_supports_ajax_call => false }
|
225
|
-
test_data.each { |key, value|
|
226
|
-
assert_equal(
|
227
|
-
value,
|
228
|
-
first_holding.send(key),
|
229
|
-
"#{searcher.class} first holding has an unexpected #{key}: #{first_holding.send(key)}")
|
230
|
-
}
|
231
|
-
end
|
232
|
-
|
233
|
-
|
234
|
-
# Test search for a single Primo document w/ rsrcs.
|
235
|
-
def test_rsrcs
|
236
|
-
searcher = Exlibris::Primo::Searcher.new(
|
237
|
-
@searcher_setup,
|
238
|
-
{ :primo_id => @primo_rsrcs_doc_id })
|
239
|
-
rsrcs = searcher.rsrcs
|
240
|
-
assert_instance_of(Array, rsrcs,
|
241
|
-
"#{searcher.class} rsrcs is an unexpected object: #{rsrcs.class}")
|
242
|
-
assert_equal(2, rsrcs.count,
|
243
|
-
"#{searcher.class} returned an unexpected amount of rsrcs (#{rsrcs.count}) for doc id: #{@primo_rsrcs_doc_id}.")
|
244
|
-
first_rsrc = rsrcs.first
|
245
|
-
assert_instance_of(
|
246
|
-
Exlibris::Primo::Rsrc,
|
247
|
-
first_rsrc,
|
248
|
-
"#{searcher.class} first rsrc is an unexpected object: #{first_rsrc.class}")
|
267
|
+
# Test search for a single Primo document w/ tocs.
|
268
|
+
def test_tocs
|
269
|
+
searcher = Exlibris::Primo::Searcher.new(
|
270
|
+
@searcher_setup,
|
271
|
+
{ :primo_id => @primo_tocs_doc_id })
|
272
|
+
tocs = searcher.tocs
|
273
|
+
assert_instance_of(Array, tocs,
|
274
|
+
"#{searcher.class} tocs is an unexpected object: #{tocs.class}")
|
275
|
+
assert_equal(1, tocs.count,
|
276
|
+
"#{searcher.class} returned an unexpected amount of tocs (#{tocs.count}) for doc id: #{@primo_tocs_doc_id}.")
|
277
|
+
first_toc = tocs.last
|
278
|
+
assert_instance_of(
|
279
|
+
Exlibris::Primo::Toc,
|
280
|
+
first_toc,
|
281
|
+
"#{searcher.class} first toc is an unexpected object: #{first_toc.class}")
|
249
282
|
test_data = {
|
250
|
-
:record_id => "
|
251
|
-
:
|
252
|
-
:
|
253
|
-
:display => "Online Version",
|
254
|
-
:institution_code => "NYU",
|
255
|
-
:origin => nil,
|
283
|
+
:record_id => "nyu_aleph003149772",
|
284
|
+
:url => "http://www.loc.gov/catdir/toc/onix07/2001024342.html",
|
285
|
+
:display => "Table of Contents",
|
256
286
|
:notes => "" }
|
257
287
|
test_data.each { |key, value|
|
258
288
|
assert_equal(
|
259
289
|
value,
|
260
|
-
|
261
|
-
"#{searcher.class} first
|
290
|
+
first_toc.send(key),
|
291
|
+
"#{searcher.class} first toc has an unexpected #{key}: #{first_toc.send(key)}")
|
262
292
|
}
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
def test_tocs
|
267
|
-
searcher = Exlibris::Primo::Searcher.new(
|
268
|
-
@searcher_setup,
|
269
|
-
{ :primo_id => @primo_tocs_doc_id })
|
270
|
-
tocs = searcher.tocs
|
271
|
-
assert_instance_of(Array, tocs,
|
272
|
-
"#{searcher.class} tocs is an unexpected object: #{tocs.class}")
|
273
|
-
assert_equal(1, tocs.count,
|
274
|
-
"#{searcher.class} returned an unexpected amount of tocs (#{tocs.count}) for doc id: #{@primo_tocs_doc_id}.")
|
275
|
-
first_toc = tocs.last
|
276
|
-
assert_instance_of(
|
277
|
-
Exlibris::Primo::Toc,
|
278
|
-
first_toc,
|
279
|
-
"#{searcher.class} first toc is an unexpected object: #{first_toc.class}")
|
280
|
-
test_data = {
|
281
|
-
:record_id => "nyu_aleph003149772",
|
282
|
-
:url => "http://www.loc.gov/catdir/toc/onix07/2001024342.html",
|
283
|
-
:display => "Table of Contents",
|
284
|
-
:notes => "" }
|
285
|
-
test_data.each { |key, value|
|
286
|
-
assert_equal(
|
287
|
-
value,
|
288
|
-
first_toc.send(key),
|
289
|
-
"#{searcher.class} first toc has an unexpected #{key}: #{first_toc.send(key)}")
|
290
|
-
}
|
291
|
-
end
|
292
|
-
|
293
|
-
def test_dedupmrg
|
293
|
+
end
|
294
|
+
|
295
|
+
def test_dedupmrg
|
294
296
|
searcher = Exlibris::Primo::Searcher.new(
|
295
297
|
@searcher_setup,
|
296
298
|
{ :primo_id => @primo_dedupmrg_doc_id })
|
@@ -357,55 +359,57 @@ class PrimoSearcherTest < Test::Unit::TestCase
|
|
357
359
|
first_rsrc.send(key),
|
358
360
|
"#{searcher.class} first rsrc has an unexpected #{key}: #{first_rsrc.send(key)}")
|
359
361
|
}
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
362
|
+
end
|
363
|
+
|
364
|
+
# def test_holdings_diacritics1
|
365
|
+
# searcher = Exlibris::Primo::Searcher.new(
|
366
|
+
# @searcher_setup,
|
367
|
+
# { :primo_id => @primo_test_diacritics1_doc_id })
|
368
|
+
# assert_equal(
|
369
|
+
# "Rubāʻīyāt-i Bābā Ṭāhir",
|
370
|
+
# searcher.btitle,
|
371
|
+
# "#{searcher.class} has an unexpected btitle: #{searcher.btitle}")
|
372
|
+
# assert_equal(
|
373
|
+
# "Bābā-Ṭāhir, 11th cent",
|
374
|
+
# searcher.au,
|
375
|
+
# "#{searcher.class} has an unexpected author: #{searcher.au}")
|
376
|
+
# end
|
377
|
+
|
378
|
+
# # This test fails but I don't know why!
|
379
|
+
# def test_holdings_diacritics2
|
380
|
+
# searcher = Exlibris::Primo::Searcher.new(
|
381
|
+
# @searcher_setup,
|
382
|
+
# { :primo_id => @primo_test_diacritics2_doc_id })
|
383
|
+
# assert_equal(
|
384
|
+
# "أقليم توات خلال القرنين الثامن عشر والتاسع عشر الميلاديين : دراسة لأوضاع الأقليم السياسية والأجتماعية والأقتصادية والثقافية، مع تحقيق كتاب القول البسيط في أخبار تمنطيط (لمحمد بن بابا حيده)",
|
385
|
+
# searcher.btitle,
|
386
|
+
# "#{searcher.class} has an unexpected btitle: #{searcher.btitle}")
|
387
|
+
# puts ("\n")
|
388
|
+
# puts searcher.au.bytes.collect.inspect
|
389
|
+
# faraj = "Faraj, Faraj Maḥmūd"
|
390
|
+
# puts ("\n»")
|
391
|
+
# puts "»".bytes.collect.inspect
|
392
|
+
# puts faraj.bytes.collect.inspect
|
393
|
+
# assert_equal(
|
394
|
+
# "Faraj, Faraj Maḥmūd",
|
395
|
+
# searcher.au,
|
396
|
+
# "#{searcher.class} has an unexpected author: #{searcher.au}")
|
397
|
+
# assert_equal("(DT299.T88 F373 2007)", first_holding.call_number, "#{searcher.class} first holding has an unexpected call number: #{first_holding.call_number}")
|
398
|
+
# end
|
399
|
+
#
|
400
|
+
# def test_holdings_diacritics3
|
401
|
+
# searcher = Exlibris::Primo::Searcher.new(
|
402
|
+
# @searcher_setup,
|
403
|
+
# { :primo_id => @primo_test_diacritics3_doc_id })
|
404
|
+
# assert_equal(
|
405
|
+
# "Mul har ha-gaʻash : ḥoḳre toldot Yiśraʼel le-nokhaḥ ha-Shoʼah",
|
406
|
+
# searcher.btitle,
|
407
|
+
# "#{searcher.class} has an unexpected btitle: #{searcher.btitle}")
|
408
|
+
# assert_equal(
|
409
|
+
# "Engel, David",
|
410
|
+
# searcher.au,
|
411
|
+
# "#{searcher.class} has an unexpected author: #{searcher.au}")
|
412
|
+
# end
|
375
413
|
|
376
|
-
|
377
|
-
# def test_holdings_diacritics2
|
378
|
-
# searcher = Exlibris::Primo::Searcher.new(
|
379
|
-
# @searcher_setup,
|
380
|
-
# { :primo_id => @primo_test_diacritics2_doc_id })
|
381
|
-
# assert_equal(
|
382
|
-
# "أقليم توات خلال القرنين الثامن عشر والتاسع عشر الميلاديين : دراسة لأوضاع الأقليم السياسية والأجتماعية والأقتصادية والثقافية، مع تحقيق كتاب القول البسيط في أخبار تمنطيط (لمحمد بن بابا حيده)",
|
383
|
-
# searcher.btitle,
|
384
|
-
# "#{searcher.class} has an unexpected btitle: #{searcher.btitle}")
|
385
|
-
# puts ("\n")
|
386
|
-
# puts searcher.au.bytes.collect.inspect
|
387
|
-
# faraj = "Faraj, Faraj Maḥmūd"
|
388
|
-
# puts ("\n»")
|
389
|
-
# puts "»".bytes.collect.inspect
|
390
|
-
# puts faraj.bytes.collect.inspect
|
391
|
-
# assert_equal(
|
392
|
-
# "Faraj, Faraj Maḥmūd",
|
393
|
-
# searcher.au,
|
394
|
-
# "#{searcher.class} has an unexpected author: #{searcher.au}")
|
395
|
-
# assert_equal("(DT299.T88 F373 2007)", first_holding.call_number, "#{searcher.class} first holding has an unexpected call number: #{first_holding.call_number}")
|
396
|
-
# end
|
397
|
-
#
|
398
|
-
# def test_holdings_diacritics3
|
399
|
-
# searcher = Exlibris::Primo::Searcher.new(
|
400
|
-
# @searcher_setup,
|
401
|
-
# { :primo_id => @primo_test_diacritics3_doc_id })
|
402
|
-
# assert_equal(
|
403
|
-
# "Mul har ha-gaʻash : ḥoḳre toldot Yiśraʼel le-nokhaḥ ha-Shoʼah",
|
404
|
-
# searcher.btitle,
|
405
|
-
# "#{searcher.class} has an unexpected btitle: #{searcher.btitle}")
|
406
|
-
# assert_equal(
|
407
|
-
# "Engel, David",
|
408
|
-
# searcher.au,
|
409
|
-
# "#{searcher.class} has an unexpected author: #{searcher.au}")
|
410
|
-
# end
|
414
|
+
end
|
411
415
|
end
|