Changeset 1716 for trunk/test


Ignore:
Timestamp:
Apr 6, 2011, 4:40:13 PM (10 years ago)
Author:
s.h.sikkema@…
Message:

new gdtImporter; new jumpbar; excel export to webflow; fixed spelling errors on home page; added menu entry for new gdtImporter

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
         1.classpath
         2.project
         3.idea
        14*.iml
        2 .classpath
        3 *.log
        4 .idea
        5 .project
        65target
        76{}
        87[:]
        9 .settings
        108.skip-studies
        119out
        12 dtd
         10.settings
         11*.log
  • trunk/test/unit/dbnp/studycapturing/AssayControllerTests.groovy

    r1559 r1716  
    2525    }
    2626
    27     void testWrongAssayID() {
    28         mockFlash.assayId = 3
    2927
    30         controller.compileExportData()
     28// Disabled testing of controller since I made a webflow out of the excel export
     29// testing might prove necessary later but tests need to be rewritten
    3130
    32         assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
    33         assertEquals 'Error message', 'No assay found with id: 3', mockFlash.errorMessage
    34     }
     31//    void testWrongAssayID() {
     32//        mockFlash.assayId = 3
     33//
     34//        controller.compileExportData()
     35//
     36//        assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
     37//        assertEquals 'Error message', 'No assay found with id: 3', mockFlash.errorMessage
     38//    }
    3539
    36     void testExceptionHandling() {
    37         mockFlash.assayId = 1
    38 
    39         controller.metaClass.'grailsApplication' = [
    40                 config: [modules: [metabolomics: [url: 'www.ab.com']]]
    41         ]
    42 
    43         controller.assayService = [
    44 
    45                 collectAssayData:               {a, b, c -> throw new Exception('msg1') },
    46                 convertColumnToRowStructure:    {a -> throw new Exception('msg2')},
    47                 exportRowWiseDataToExcelFile:   {a, b -> throw new Exception('msg3') }
    48 
    49         ]
    50 
    51         controller.compileExportData()
    52 
    53         assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
    54         assertEquals 'Error message', 'msg1', mockFlash.errorMessage
    55 
    56         controller.assayService.collectAssayData = {a, b, c -> true}
    57         controller.compileExportData()
    58 
    59         assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
    60         assertEquals 'Error message', 'msg2', mockFlash.errorMessage
    61 
    62         controller.doExport()
    63 
    64         assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
    65         assertEquals 'Error message', 'msg3', mockFlash.errorMessage
    66 
    67     }
     40//    void testExceptionHandling() {
     41//        mockFlash.assayId = 1
     42//
     43//        controller.metaClass.'grailsApplication' = [
     44//                config: [modules: [metabolomics: [url: 'www.ab.com']]]
     45//        ]
     46//
     47//        controller.assayService = [
     48//
     49//                collectAssayData:               {a, b, c -> throw new Exception('msg1') },
     50//                convertColumnToRowStructure:    {a -> throw new Exception('msg2')},
     51//                exportRowWiseDataToExcelFile:   {a, b -> throw new Exception('msg3') }
     52//
     53//        ]
     54//
     55//        controller.compileExportData()
     56//
     57//        assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
     58//        assertEquals 'Error message', 'msg1', mockFlash.errorMessage
     59//
     60//        controller.assayService.collectAssayData = {a, b, c -> true}
     61//        controller.compileExportData()
     62//
     63//        assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
     64//        assertEquals 'Error message', 'msg2', mockFlash.errorMessage
     65//
     66//        controller.doExport()
     67//
     68//        assertEquals 'Redirected action should match', [action: 'selectAssay'], redirectArgs
     69//        assertEquals 'Error message', 'msg3', mockFlash.errorMessage
     70//
     71//    }
    6872
    6973}
Note: See TracChangeset for help on using the changeset viewer.