Changeset 402


Ignore:
Timestamp:
May 11, 2010, 11:00:09 AM (14 years ago)
Author:
keesvb
Message:

some minor changes to subject tests

File:
1 edited

Legend:

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

    r400 r402  
    7373                assert subject.validate()
    7474
    75                 // Change name to already existing name, should fail
    76                 subject.name = testSubjectName
    77                 assert !subject.validate()
     75                // TODO: Set study and change name to already existing name, should fail within one study
     76                // subject.name = testSubjectName
     77                // assert !subject.validate()
    7878        }
    7979
     
    106106                assert speciesOntologies.size() == 1
    107107
    108                 println speciesOntologies.class
    109108                // Getting the only element in a set is hard in Grails...
    110109                Ontology speciesOntology = speciesOntologies.asList().first()
     
    127126                assert subject.save(flush:true)
    128127
    129                 assert subjectDB.getFieldValue('species') == humanTerm
    130                 assert subjectDB.getFieldValue('name').equals(testSubjectName)
    131                 assert subjectDB.getFieldValue('species') == humanTerm
     128                assert subject.getFieldValue('species') == humanTerm
     129                assert subject.getFieldValue('name').equals(testSubjectName)
     130                assert subject.getFieldValue('species') == humanTerm
    132131
    133132        }
     
    146145
    147146        /**
    148          * Test setFieldValue() for template fields
     147         * Test setFieldValue() and getFieldValue() for template fields
     148     * This cannot be done in separate tests, as the database state is reset in between
    149149         */
    150150        void testTemplateFieldSetters() {
     
    161161                // Save subject
    162162                assert subject.save(flush: true)
    163 
    164 
    165         }
    166 
    167         /**
    168         * Test getFieldValue() for template fields
    169         */
    170         void testTemplateFieldGetters() {
    171163
    172164                // Try to retrieve the subject and make sure the BMI was stored
Note: See TracChangeset for help on using the changeset viewer.