[solrmarc] r1795 committed - extra test for call number normalization

0 views
Skip to first unread message

solr...@googlecode.com

unread,
Apr 19, 2015, 10:57:52 AM4/19/15
to solrmarc...@googlegroups.com
Revision: 1795
Author: olso...@gmail.com
Date: Sun Apr 19 14:57:40 2015 UTC
Log: extra test for call number normalization
https://code.google.com/p/solrmarc/source/detail?r=1795

Modified:
/trunk/test/src/org/solrmarc/callnum/LCCallNumberUnitTests.java

=======================================
--- /trunk/test/src/org/solrmarc/callnum/LCCallNumberUnitTests.java Wed Feb
18 18:20:25 2015 UTC
+++ /trunk/test/src/org/solrmarc/callnum/LCCallNumberUnitTests.java Sun Apr
19 14:57:40 2015 UTC
@@ -1131,6 +1131,21 @@
assertEquals(callnumKey, new
LCCallNumber(callnumUpper).getShelfKey());
assertEquals(callnumKey, new
LCCallNumber(callnumLower).getShelfKey());
}
+
+ /**
+ * unit test for getShelfKey: check that mixed case user input is
handled sensibly
+ */
+ @Test
+ public void testGetShelfKey_mixedCase()
+ {
+ // Check that upper case and lower case input normalizer the same
+ String callnumUpper = "PR6058.A68828";
+ String callnumMixed = "pr6058.A68828";
+ String callnumLower = "pr6058.a68828";
+ String callnumKey = new LCCallNumber(callnumUpper).getShelfKey();
+ assertEquals(callnumKey, new
LCCallNumber(callnumMixed).getShelfKey());
+ assertEquals(callnumKey, new
LCCallNumber(callnumLower).getShelfKey());
+ }

/**
* unit test for getShelfKey: check empty string call number
Reply all
Reply to author
Forward
0 new messages