Testing c# application with NUnit Framework in Visual Studio.
The application i am testing here was a project for OOP C# lessons. In the app I was supposed to create a hospital object with doctors objects as hospital workers and patients objects assigned to the latter. There was alot lof logic which could be tested so I took advantage of that fact. I used NUnit framework for testing purposes. The application contains classes:
- Przychodnia (eng. clinic)
- Pacjent (eng. patient)
- Lekarz (eng. doctor)
- Choroba (eng. disease)
All of the above cases were tested. There are 38 tests overall. Especially interesting case was with groupAllPacjenci function within Przychodnia class, from which i will put screenshots of and describe briefly below.
The function itself is supposed to group patients based on their condition (number of diseases they have), and put them into proper list of patients with said condition. There are 3 lists of patients which are called accordingly to their condition state.
- lekkoChorzy - slightly ill
- niezleChorzy - seriously ill
- tragedia - on the edge of death
As said before each of those are separate lists. Because of that fact a list of lists had to be created in order to check in which one of those the patient will be added within the current test case.
- C# - version 7.1
- NUnit Framework - version 3.0
To run this test Project, You need to have:
- Visual Studio with c# environmet
- NUnit
- NUnit3TestAdapter
Project is: Done