Versions Compared

Key

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

...


Name

Expected result

Parameters

Actual result

SuccessComments
1getAllGraphs()

Returns a GraphsDTO with the following information.

GraphsDTO{

name = "test"

tabID =  1

id = 1

}


Returns the expected list of DTOs.Yes
2addGraph()Throws a DatabaseException.

tabID = 1

graphID = 1

graphType = "linechart"

A DatabaseException is thrown.YesThe return value cannot be tested, since this method returns a void. That is why the Exception is checked, instead of a return value. The method can however be tested by the mockito.verify function.
3deleteGraphs()Throws a DatabaseException.

tabID = 1

graphID = 1

A DatabaseException is thrown.YesThe return value cannot be tested, since this method returns a void. That is why the Exception is checked, instead of a return value. The method can however be tested by the mockito.verify function.

Table 1: Tests in GraphServiceTest

...