Class CompositeSequenceArgTest
java.lang.Object
ubic.gemma.rest.util.args.CompositeSequenceArgTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe pre-existing 400 is preserved where it was actually right: the id names a real probe on another platform and nothing on this platform carries that name.voidThe id keeps precedence, and costs no extra query: a numeric argument that resolves to a probe on the requested platform must not also trigger a name lookup.voidThe fallback looks up the spelling as written, not a re-rendering of the parsed long -- a probe named "007" is not a probe named "7".voidNeither an id nor a name match yields null, which the arg service turns into a 404.voidvoidA probe NAME can be entirely numeric -- Agilent feature-number arrays name every probe with a bare integer -- and the numeric branch ofCompositeSequenceArg.valueOf(String)reads it as an id.voidvoidvoidvoid
-
Constructor Details
-
CompositeSequenceArgTest
public CompositeSequenceArgTest()
-
-
Method Details
-
testValueOfNumericDispatchesToIdArg
@Test public void testValueOfNumericDispatchesToIdArg() -
testValueOfStringDispatchesToNameArg
@Test public void testValueOfStringDispatchesToNameArg() -
testValueOfEmptyRaises
@Test public void testValueOfEmptyRaises() -
testValueOfBlankRaises
@Test public void testValueOfBlankRaises() -
numericNameIsFoundWhenTheIdBelongsToAnotherPlatform
@Test public void numericNameIsFoundWhenTheIdBelongsToAnotherPlatform()A probe NAME can be entirely numeric -- Agilent feature-number arrays name every probe with a bare integer -- and the numeric branch ofCompositeSequenceArg.valueOf(String)reads it as an id. Verified on gemma2: the probe named "22575" on GPL890 has id 209787, so the id lookup lands on an unrelated probe on another platform. The name lookup has to take over. -
numericNameIsFoundWhenNoSuchIdExistsAtAll
@Test public void numericNameIsFoundWhenNoSuchIdExistsAtAll() -
idOnTheRequestedPlatformWinsWithoutANameLookup
@Test public void idOnTheRequestedPlatformWinsWithoutANameLookup()The id keeps precedence, and costs no extra query: a numeric argument that resolves to a probe on the requested platform must not also trigger a name lookup. -
idOnAnotherPlatformWithNoNameMatchStillRaises
@Test public void idOnAnotherPlatformWithNoNameMatchStillRaises()The pre-existing 400 is preserved where it was actually right: the id names a real probe on another platform and nothing on this platform carries that name. -
neitherIdNorNameYieldsNull
@Test public void neitherIdNorNameYieldsNull()Neither an id nor a name match yields null, which the arg service turns into a 404. -
nameFallbackPreservesLeadingZeroes
@Test public void nameFallbackPreservesLeadingZeroes()The fallback looks up the spelling as written, not a re-rendering of the parsed long -- a probe named "007" is not a probe named "7".
-