Class CharacteristicTest
java.lang.Object
ubic.gemma.model.common.description.CharacteristicTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe no-break spaces are the ones a normalizer quietly misses.voidNull must survive as null: "no value" stays distinct from "blank".voidFree-text term fields carry the submitter's spacing.voidvoidvoidvoid
-
Constructor Details
-
CharacteristicTest
public CharacteristicTest()
-
-
Method Details
-
testEquals
@Test public void testEquals() -
testComparator
@Test public void testComparator() -
termTextIsNormalizedOnWrite
@Test public void termTextIsNormalizedOnWrite()Free-text term fields carry the submitter's spacing. In production 13,179 characteristic values held an internal double space and 12,861 of those had the run in the submitter's own originalValue, so the input reproduces them on every import; a further 4,406 carried edge whitespace. MySQL's PAD SPACE collation hides a TRAILING space from `=` but gives internal runs no cover, so two spellings of one value split under GROUP BY, joins and every exact-label comparison. Normalize where every writer passes. -
noBreakSpacesAreNormalizedToo
@Test public void noBreakSpacesAreNormalizedToo()The no-break spaces are the ones a normalizer quietly misses. Java does not classify U+202F or U+2007 as whitespace, so StringUtils.normalizeSpace leaves them alone; and although it maps U+00A0 to a plain space it does not re-collapse afterwards, so a run of them comes back as a run of ORDINARY double spaces -- the normalizer emitting the exact defect it exists to remove. Production carries 2,392 values with U+00A0 and 5 with U+202F. -
nullTermTextStaysNull
@Test public void nullTermTextStaysNull()Null must survive as null: "no value" stays distinct from "blank". -
testACharacteristicSurvivesBeingReTermedInsideASet
@Test public void testACharacteristicSurvivesBeingReTermedInsideASet() -
testEqualsAndHashCodeAgreeForTwoInstancesOfOneRow
@Test public void testEqualsAndHashCodeAgreeForTwoInstancesOfOneRow()
-