This is a .NET project that includes a data management system using SQLite. It provides functionalities to add, delete, and update data, as well as display data within a specified time period. The project also includes unit tests to ensure the correctness of the implemented functionalities.
-
Clone the repository:
git clone https://github.com/pomidornijfrukt/project.git cd Project
-
Install the necessary .NET SDK. You can download it from here.
-
Restore the dependencies:
dotnet restore
To add the required NuGet packages, you can run the following commands in your console:
For the main project:
dotnet add Project package Microsoft.Data.SQLite --version 8.0.4
dotnet add Project package System.Data.SQLite --version 1.0.118
For the test in the project:
dotnet add Project.Tests package Microsoft.NET.Test.Sdk --version 17.6.0
dotnet add Project.Tests package xunit --version 2.4.1
dotnet add Project.Tests package xunit.runner.visualstudio --version 2.4.3
dotnet add Project.Tests package Moq --version 4.16.1
To run the application, use the following command:
dotnet run --project Project
This will execute the main project located in the Project
directory.
To run the unit tests, use the following command:
dotnet test
This will execute all tests in the Project.Tests
project and display the results.
The project consists of two main parts:
- Project: Contains the main application logic and data management functionalities.
- Project.Tests: Contains unit tests to verify the correctness of the functionalities implemented in the main project.
DataDB.cs
: Contains methods for adding, deleting, updating, and displaying data in the SQLite database.UsersDB.cs
: Contains methods for managing the active user.
DataDBTests.cs
: Contains unit tests for the methods inDataDB.cs
.UsersDBTests.cs
: Contains unit tests for the methods inUsersDB.cs
.
The Project
depends on the following NuGet packages:
Microsoft.Data.SQLite
(Version 8.0.4)System.Data.SQLite
(Version 1.0.118)
The Project.Tests
depends on the following NuGet packages:
Microsoft.NET.Test.Sdk
(Version 17.6.0)xunit
(Version 2.4.1)xunit.runner.visualstudio
(Version 2.4.3)Moq
(Version 4.16.1)