Class CharacteristicUtilsTest
java.lang.Object
ubic.gemma.model.common.description.CharacteristicUtilsTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe converter must carry every fieldCharacteristicdeclares, not just category and value.voidAn already-persistent Statement must keep its identity, not be replaced by a copy.voidvoidvoidvoidvoidIdentity is the content, not the Java type.voidvoidvoidvoid
-
Constructor Details
-
CharacteristicUtilsTest
public CharacteristicUtilsTest()
-
-
Method Details
-
testUncategorized
@Test public void testUncategorized() -
testIsFreeTextCategory
@Test public void testIsFreeTextCategory() -
testIsFreeText
@Test public void testIsFreeText() -
testEquals
@Test public void testEquals() -
testCompareTerm
@Test public void testCompareTerm() -
testSameTagPlain
@Test public void testSameTagPlain() -
testSameTagComparesContentNotType
@Test public void testSameTagComparesContentNotType()Identity is the content, not the Java type. This is what makes upgrading experiment tags to statements safe: during the upgrade one side of a comparison carries whichever form the row or the caller happens to have, and treating those as different would makeaddAnnotationstop rejecting duplicates andupdateAnnotationsdrop and re-add the whole set. -
testSameTagStatementComparesPredicateAndObject
@Test public void testSameTagStatementComparesPredicateAndObject() -
testSameTagStatementComparesSecondPair
@Test public void testSameTagStatementComparesSecondPair() -
testAsStatementCarriesEveryField
@Test public void testAsStatementCarriesEveryField()The converter must carry every fieldCharacteristicdeclares, not just category and value.Statement.Factory.newInstance( Characteristic )copies only those two, so using it here would silently drop the evidence code, the supporting evidence and the original value — the provenance, on exactly the write path that records provenance. -
testAsStatementReturnsAStatementUnchanged
@Test public void testAsStatementReturnsAStatementUnchanged()An already-persistent Statement must keep its identity, not be replaced by a copy.
-