Skip to content

Repository files navigation

Integration Tests - SQL Server

C# .NET MS SQL Server Docker NUnit xUnit

This is a test project for Back-End Test Technologies January 2024 Course @ SoftUni.


Project Description

This repository contains a project designed for integration testing using SQL Server as the backend database.

Introduction - LibroConsoleAPI

LibroConsoleAPI is a console application developed with .NET Core, enabling users to manage a library of books through CRUD operations performed on a SQL Server database.

Key Features

This project demonstrates core software development principles like integration testing, database management, and console-based application architecture.

  • Create: Add books to the database.
  • Read: Retrieve details of books from the database.
  • Update: Modify existing book information.
  • Delete: Remove books from the database.

Project Structure

  • LibroConsoleAPI: The main project that serves as the application’s entry point.
  • Business: Implements the core functionality of the application.
  • Common: Contains validation rules and constraints for data.
  • Data: Defines models representing the data managed by the application.
  • DataAccess: Acts as a bridge between business logic and the data layer.

Technologies Used

  • .NET Core: The primary framework used for building the console application.
  • SQL Server: The database management system used for storing book data.
  • Entity Framework Core: An ORM (Object-Relational Mapper) for database interactions.
  • xUnit: A unit-testing framework for .NET applications.
  • nUnit: A unit-testing framework for .NET applications.

Docker Integration

You can also run the SQL Server using a Docker image, which simplifies the setup and ensures consistency across different environments. To set up SQL Server with Docker, follow these steps:

  1. Pull the SQL Server Docker image:

    docker pull mcr.microsoft.com/mssql/server
  2. Run the Docker container:

    docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Your_password123' -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server
  3. Connect to the SQL Server:

    • Use the connection string: Server=localhost,1433;Database=YourDatabase;User Id=sa;Password=Your_password123;
    • Replace YourDatabase with the name of your database.

For more information on using Docker with SQL Server, you can refer to the official Docker documentation and the SQL Server on Docker guide.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, please open an issue in the repository.


Happy Testing! 🚀

About

Testing Console-based application built using .Net Core Framework

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages