Versions Compared

Key

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

Authors:

Name

Student number

679586

Teachers:

Name

Function

Skills begeleider

Procesbegeleider

Klas

ITA-OOSE-A

GroepsnaamSmalltalk
CourseOOSE
Datum

 

Versie

1.

Page info
infoTypeCurrent version
page$self
typeFlat

In this document we will take a look at the safety of the application. This is mainly focused on unit tests and what they do.

...


Name

Expected result

Parameters

Actual result

SuccessComments
1checkCorrectUsernameResponse()Gives the same username back as the user has given to the system.

LoginRequestDTO{

username = 'Erik'
password = 'Welkom123'

}

The class returns 'Erik', and thus gives the same username back.YesThe response from the database is set manually, because a connection to the real database is not safe in tests.
2checkCorrectTokenResponse()Gives a new token dedicated to a specific name.

LoginRequestDTO{

username = 'Erik'
password = 'Welkom123'

}

The class returns the same token as expected for the user given.YesThe response from the database is set manually, because a connection to the real database is not safe in tests.
3checkThrownExceptionWrongPassword()Throws a LoginCredentialsIncorrectException after wrong input of the password.

LoginRequestDTO{

username = 'Erik'
password = 'WrongPassword'

}

A LoginCredentialsIncorrectException is thrown.YesThe response from the database is set manually, because a connection to the real database is not safe in tests. In this case it's set to 0, to simulate the database returning nothing.
4checkThrownExceptionWrongUser()Throws a LoginCredentialsIncorrectException after wrong input of the name.

LoginRequestDTO{

username = 'WrongUser'
password = 'Welkom123'

}

A LoginCredentialsIncorrectException is thrown.YesThe response from the database is set manually, because a connection to the real database is not safe in tests. In this case it's set to 0, to simulate the database returning nothing.
5checkThrownExceptionNoUserAndPassword()Throws a LoginCredentialsIncorrectException after no input.

LoginRequestDTO{

username = ''
password = ''

}

A LoginCredentialsIncorrectException is thrown.YesThe response from the database is set manually, because a connection to the real database is not safe in tests. In this case it's set to 0, to simulate the database returning nothing.