Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Test Case No.

Method to test

Scenario

Outcome of successful test

1 (addProfile())

addProfile(...)

  • storage of a profile into the db
  • returned id > 0

2 (getProfile())

getProfile(...)

  • storage of a profile into the db
  • receive the profile and compare the values
  • return ProfileData is not null
  • values of the retrieved profile must be equal to the values of the stored profile

3 (updateProfile())

updateProfile(...)

  • storage of a profile into the db
  • change the profile and perform update
  • receive the profile and compare the values
  • no DataAccessException thrown
  • values of the retrieved profile must be equal to the values of the updated version of the profile
  • values of the retrieved profile must be unequal to the values of the initial version of the profile

4 (deleteProfile())

deleteProfile(...)

  • storage of a profile into the db
  • deletion of the profile
  • second deletion of the profile to ensure that the profile is really deleted
  • no EntityNotFoundException is thrown during first deletion
  • EntityNotFoundException is thrown during second deletion

5 (getNoneExistingProfile())

getProfile(...)

  • receive a profile which is not inside the database
  • returned ProfileData object is null

7 6 (cascadeDeleteOfProfile())

 

  • storage of a profile into the db
  • deletion of the environment
  • receive the profile
  • returned ProfileData object is null

...

Test Case No.

Name of Test Method

Scenario

Outcome of successful test

1

getSensortype()

  • check if retrievedEnvironment has sensor types
  • No LazyInitializationException is thrown
  • Set of sensor types is empty

2

getProfile()

  • check if retrievedEnvironment has profiles
  • No LazyInitializationException is thrown
  • Set of profiles is 1

3

getExceptionSensorDefinitionsFromEnvironmentProfile()

  • check if profileWithOutSensorDefinitions has exception sensor definitions
  • LazyInitializationException is thrown

4

getMethodSensorDefinitionsFromEnvironmentProfile()

  • check if profileWithOutSensorDefinitions has method sensor definitions  
  • LazyInitializationException is thrown

5

getPlatformSensorDefinitionsFromEnvironmentProfile()

  • check if profileWithOutSensorDefinitions has platform sensor definitions
  • LazyInitializationException is thrown

6

getExceptionSensorDefinitionsFromProfile()

  • check if profileWithSensorDefinitions has exception sensor definitions
  • no LazyInitializationException is thrown

7

getMethodSensorDefinitionsFromProfile()

  • check if profileWithSensorDefinitions has method sensor definitions
  • no LazyInitializationException is thrown

8

getPlatformSensorDefinitionsFromProfile()

  • check if profileWithSensorDefinitions has platform sensor definitions
  • no LazyInitializationException is thrown