Class ArrayDesignAnnotationServiceImplTest

java.lang.Object
ubic.gemma.core.analysis.service.ArrayDesignAnnotationServiceImplTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class ArrayDesignAnnotationServiceImplTest extends Object
  • Constructor Details

    • ArrayDesignAnnotationServiceImplTest

      public ArrayDesignAnnotationServiceImplTest()
  • Method Details

    • generateAnnotationFile_whenATermIsNotInTheLoadedOntology_writesTheRemainingTerms

      @Test public void generateAnnotationFile_whenATermIsNotInTheLoadedOntology_writesTheRemainingTerms() throws Exception
      A GO association whose URI is not in the loaded ontology makes GeneOntologyService.getTerm(String) return null. Collecting that null used to hand it straight to GeneOntologyUtils.asRegularGoId(OntologyTerm) (and, for the LONG output type, to getAllParents), which dereference every element — so a single unresolvable term aborted the whole annotation file with a bare NullPointerException.
      Throws:
      Exception
    • create_whenGenerationFails_keepsThePreviousFile

      @Test public void create_whenGenerationFails_keepsThePreviousFile(@TempDir Path annotDataDir) throws Exception
      The previous annotation file was deleted before the new one was written in place, so a failure midway left a truncated file that was still valid gzip, and it was served as the platform's annotations.
      Throws:
      Exception