Changeset 440


Ignore:
Timestamp:
May 19, 2010, 4:39:48 PM (14 years ago)
Author:
keesvb
Message:

sorry, forgot to delete an accolade

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/integration/gscf/OntologyTests.groovy

    r439 r440  
    3535
    3636                def ontology = new Ontology(
    37                                 name: testOntologyName,
    38                                 description: testOntologyDescription,
    39                                 url: testOntologyUrl,
    40                                 versionNumber: testOntologyVersionNumber,
    41                                 ncboId: testOntologyNcboId,
    42                                 ncboVersionedId: testOntologyNcboVersionedId
     37                    name: testOntologyName,
     38                    description: testOntologyDescription,
     39                    url: testOntologyUrl,
     40                    versionNumber: testOntologyVersionNumber,
     41                    ncboId: testOntologyNcboId,
     42                    ncboVersionedId: testOntologyNcboVersionedId
    4343                );
    4444
    4545                // Validate and save ontology
    4646                assert ontology.validate()
    47                 assert ontology.save(flush:true)
     47                assert ontology.save(flush: true)
    4848        }
    4949
     
    5555         * Test if ontology was properly saved
    5656         */
    57         void testSave () {
     57        void testSave() {
    5858
    5959                // Try to retrieve the ontology and make sure it's the same
     
    7070
    7171        /**
    72         * Test saving and retrieving a term within the ontology and test giveTermByName(name) and giveTerms()
    73         */
     72         * Test saving and retrieving a term within the ontology and test giveTermByName(name) and giveTerms()
     73         */
    7474        void testTermSave() {
    7575
     
    8080                // Create a new term
    8181                def term = new Term(
    82                         name: testTermName,
    83                         accession: testAccession,
    84                         ontology: testOntology
     82                    name: testTermName,
     83                    accession: testAccession,
     84                    ontology: testOntology
    8585                )
    8686
    8787                assert term.validate()
    88                 assert term.save(flush:true)
     88                assert term.save(flush: true)
    8989
    9090                // Try to retrieve the term from the ontology and make sure it's the same
     
    102102
    103103        /**
    104         * Ontocat test for debug purposes: show all properties of a certain ontology
    105         */
     104         * Ontocat test for debug purposes: show all properties of a certain ontology
     105         */
    106106        private void testOntocatBioPortalDebug() {
    107107                // Instantiate OLS service
     
    114114                String codingScheme = bean.codingScheme
    115115                sb.append("OntologyBean:\n")
    116                 sb.append("property codingScheme="+codingScheme+"\n")
     116                sb.append("property codingScheme=" + codingScheme + "\n")
    117117                sb.append("Bean.properties:\n")
    118118                bean.properties.each {
    119                         sb.append(it.key + "=" + it.value+"\n")
     119                        sb.append(it.key + "=" + it.value + "\n")
    120120                }
    121121                sb.append "Bean:\t" + bean.dump()
     
    130130                sb.append("Ontology meta properties:\n")
    131131                o.getVersionNumber() + o.getMetaPropertyValues().each {
    132                         sb.append(it.name + "=" + it.value+"\n")
     132                        sb.append(it.name + "=" + it.value + "\n")
    133133                }
    134134                sb.append("Ontology properties:\n");
    135135                o.getProperties().each {
    136                         sb.append(it.key + "=" + it.value+"\n")
     136                        sb.append(it.key + "=" + it.value + "\n")
    137137                }
    138138                sb.append("Ontology root terms:\n");
     
    179179                        // Instantiate ontology
    180180                        def ontology = new Ontology(
    181                                         name: o.label,
    182                                         description: o.description,
    183                                         url: bean.properties['homepage'],
    184                                         //url: 'http://bioportal.bioontology.org/ontologies/' + versionedId,
    185                                         versionNumber: o.versionNumber,
    186                                         ncboId: o.ontologyAccession,
    187                                         ncboVersionedId: versionedId
     181                            name: o.label,
     182                            description: o.description,
     183                            url: bean.properties['homepage'],
     184                            //url: 'http://bioportal.bioontology.org/ontologies/' + versionedId,
     185                            versionNumber: o.versionNumber,
     186                            ncboId: o.ontologyAccession,
     187                            ncboVersionedId: versionedId
    188188                        );
    189189
    190190                        // Validate and save ontology
    191191                        assert ontology.validate()
    192                         assert ontology.save(flush:true)
     192                        assert ontology.save(flush: true)
    193193
    194194                        //println ontology.dump()
    195                         }
    196195                }
    197196        }
Note: See TracChangeset for help on using the changeset viewer.