cst.test
Class TestCaseTrialActivityModel

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by cst.test.AbstractCSTTestCase
              extended by cst.test.TestCaseTrialActivityModel
All Implemented Interfaces:
junit.framework.Test

public class TestCaseTrialActivityModel
extends AbstractCSTTestCase


 Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software 
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.  
 

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Field Summary
 
Fields inherited from class cst.test.AbstractCSTTestCase
adminServiceAPI, adminUser, DATE_FORMAT, endUser, loggingServiceAPI, sampleTrialSubjectModel, sessionProperties, simpleDateFormat, testDataSet
 
Constructor Summary
TestCaseTrialActivityModel(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testChronologyE4()
          does restrict order if enforcement of chronology is turned on.
 void testChronologyN1()
          accepts activity step dates that are in ascending order
 void testChronologyN2()
          accepts activity step dates that are in non-descending order
 void testChronologyN3()
          does not restrict order if enforcement of chronology is turned off.
 void testGetAllTrialActivityModelsA1()
           
 void testGetAllTrialActivityModelsE1()
           
 void testGetAllTrialActivityModelsN1()
           
 void testGetTrialActivityModelA1()
           
 void testGetTrialActivityModelE1()
           
 void testGetTrialActivityModelN1()
           
 void testGetValuesForCoreFieldA1()
          obtain list of values for a given core attribute from a collection of trial subject models that have not had a value set for that attribute.
 void testGetValuesForCoreFieldA2()
          gather unique values for a given core attribute from an empty collection of subject models.
 void testGetValuesForCoreFieldE1()
           
 void testGetValuesForCoreFieldN1()
           
 void testGetValuesForCoreFieldN2()
           
 void testImportDataN1()
          import feature correctly loads new records for activity models.
 void testTrialSubjectModelExistsA1()
          check for items that exist or don't exist in a one item list
 void testTrialSubjectModelExistsA2()
          check for items that exist or don't exist in an empty list
 void testTrialSubjectModelExistsN1()
          check that items exist or don't exist in a list of trial subject models.
 void testUpdateTrialActivityE1()
          update non-existent trial activity
 void testUpdateTrialActivityE2()
          update non-existent trial activity step
 void testUpdateTrialActivityN1()
           
 
Methods inherited from class cst.test.AbstractCSTTestCase
populateDatabase, userTestDataSet
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCaseTrialActivityModel

public TestCaseTrialActivityModel(java.lang.String name)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class AbstractCSTTestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class AbstractCSTTestCase
Throws:
java.lang.Exception

testTrialSubjectModelExistsN1

public void testTrialSubjectModelExistsN1()
check that items exist or don't exist in a list of trial subject models.


testTrialSubjectModelExistsA1

public void testTrialSubjectModelExistsA1()
check for items that exist or don't exist in a one item list


testTrialSubjectModelExistsA2

public void testTrialSubjectModelExistsA2()
check for items that exist or don't exist in an empty list


testGetValuesForCoreFieldN1

public void testGetValuesForCoreFieldN1()

testGetValuesForCoreFieldN2

public void testGetValuesForCoreFieldN2()

testGetValuesForCoreFieldA1

public void testGetValuesForCoreFieldA1()
obtain list of values for a given core attribute from a collection of trial subject models that have not had a value set for that attribute.


testGetValuesForCoreFieldA2

public void testGetValuesForCoreFieldA2()
gather unique values for a given core attribute from an empty collection of subject models.


testGetValuesForCoreFieldE1

public void testGetValuesForCoreFieldE1()

testGetAllTrialActivityModelsN1

public void testGetAllTrialActivityModelsN1()

testGetAllTrialActivityModelsA1

public void testGetAllTrialActivityModelsA1()

testGetAllTrialActivityModelsE1

public void testGetAllTrialActivityModelsE1()

testGetTrialActivityModelN1

public void testGetTrialActivityModelN1()

testGetTrialActivityModelA1

public void testGetTrialActivityModelA1()

testGetTrialActivityModelE1

public void testGetTrialActivityModelE1()

testUpdateTrialActivityN1

public void testUpdateTrialActivityN1()

testUpdateTrialActivityE1

public void testUpdateTrialActivityE1()
update non-existent trial activity


testUpdateTrialActivityE2

public void testUpdateTrialActivityE2()
update non-existent trial activity step


testChronologyN1

public void testChronologyN1()
accepts activity step dates that are in ascending order


testChronologyN2

public void testChronologyN2()
accepts activity step dates that are in non-descending order


testChronologyN3

public void testChronologyN3()
does not restrict order if enforcement of chronology is turned off.


testChronologyE4

public void testChronologyE4()
does restrict order if enforcement of chronology is turned on.


testImportDataN1

public void testImportDataN1()
import feature correctly loads new records for activity models.