aau-giraf / web-api

The backend API for GIRAF — a .NET-core project written in C#.
GNU General Public License v3.0
2 stars 5 forks source link

Unit tests for ErrorController. Issue#257 #280

Closed Soupaa closed 1 year ago

Soupaa commented 1 year ago

Description

Unit tests have been written for 4/5 Error handling functions in ErrorController. The last unfinished unit test, which is for Error 404 has not been written, as the correct solution to solve this specific area cannot be identified within the given time constraint.

Therefore this pull request contains these unit tests:

  1. Unit test for Error 401 Unauthorized
  2. Unit test for Error 403 Forbidden
  3. Unit test for Error 400 BadRequest
  4. Unit test for Error UnknownError

Fixes #\ Part of Issue #257

Type of change

How Has This Been Tested?

The four unit tests has been written with xUnit. Therefore this issue is mainly about testing the existing function within ErrorController file.

The testing was conducted with the xUnit "Run Test" and "Run All Tests" buttons.

Development Configuration

Checklist:

makelblack159 commented 1 year ago

kan vi få den fixed så den ikke failer integration test ?

JonasStjerne commented 1 year ago

kan vi få den fixed så den ikke failer integration test ?

Unit test burde ikke have noget med integration test at gøre. Der bliver kigget på integration test en del det her sprint ved jeg. Der sker en fejl i dem ved connection til database.