All Projects → mjebrahimi → SqlInMemory

mjebrahimi / SqlInMemory

Licence: MIT license
SqlInMemory is a library for creating SqlServer database on Memory instead of hard disk, at last Drops and Disposes database when you're done with it. This is useful for Integration Testing.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to SqlInMemory

Systemwrapper
.NET library for easier testing of system APIs.
Stars: ✭ 153 (+537.5%)
Mutual labels:  unit-testing, integration-testing
ionic-workflow-guide
Create a full and powerful worflow with Ionic (Unit Testing, Environment variables, Automatic documentation, Production App Server, Automatic deployment)
Stars: ✭ 46 (+91.67%)
Mutual labels:  unit-testing, unit-test
Onion Architecture Asp.net Core
WhiteApp API solution template which is built on Onion Architecture with all essential feature using .NET 5!
Stars: ✭ 196 (+716.67%)
Mutual labels:  unit-testing, integration-testing
Kotlinmvparchitecture
Clean MVP Architecture with Dagger2 + Retrofit2 + Mockito + Fresco + EasiestGenericRecyclerAdapter using Kotlin. Added Unit Tests(Kotlin Tests)!
Stars: ✭ 143 (+495.83%)
Mutual labels:  unit-testing, unit-test
springboot-junit5-mockito2
Show case for how to use junit 5 and mockito 2 for unit testing and integration test in spring boot 2
Stars: ✭ 18 (-25%)
Mutual labels:  unit-testing, integration-testing
Dockertest
Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.
Stars: ✭ 2,254 (+9291.67%)
Mutual labels:  unit-testing, integration-testing
EntityFrameworkCore.AutoFixture
A library aimed to minimize the boilerplate required to unit-test Entity Framework Core code using AutoFixture and in-memory providers.
Stars: ✭ 31 (+29.17%)
Mutual labels:  unit-testing, unit-test
Unit Threaded
Advanced unit test framework for D
Stars: ✭ 100 (+316.67%)
Mutual labels:  unit-testing, integration-testing
goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report.
Stars: ✭ 3,019 (+12479.17%)
Mutual labels:  unit-testing, unit-test
pythonista-chromeless
Serverless selenium which dynamically execute any given code.
Stars: ✭ 31 (+29.17%)
Mutual labels:  unit-testing, integration-testing
Movieapp
🎬 MovieApp is a Flutter application built to demonstrate the use of modern development tools with best practices implementation like Modularization, BLoC, Dependency Injection, Dynamic Theme, Cache, Shimmer, Testing, Flavor, CI/CD, etc.
Stars: ✭ 117 (+387.5%)
Mutual labels:  unit-testing, integration-testing
toUUID
Simple integer to UUID generator for unit and integration tests written in Java or Kotlin
Stars: ✭ 12 (-50%)
Mutual labels:  unit-testing, integration-testing
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (+354.17%)
Mutual labels:  unit-testing, unit-test
Android Client
An android client for the MifosX platform
Stars: ✭ 150 (+525%)
Mutual labels:  unit-testing, integration-testing
Automation Arsenal
Curated list of popular Java and Kotlin frameworks, libraries and tools related to software testing, quality assurance and adjacent processes automation.
Stars: ✭ 105 (+337.5%)
Mutual labels:  unit-testing, integration-testing
Dntframeworkcore
Lightweight and Extensible Infrastructure for Building Web Applications - Web Application Framework
Stars: ✭ 208 (+766.67%)
Mutual labels:  unit-testing, integration-testing
Kotlinrxmvparchitecture
Clean MVP Architecture with RxJava + Dagger2 + Retrofit2 + Mockito + Fresco + EasiestGenericRecyclerAdapter using Kotlin. Includes Unit Tests(Kotlin Tests)!
Stars: ✭ 94 (+291.67%)
Mutual labels:  unit-testing, unit-test
Js Unit Testing Guide
📙 A guide to unit testing in Javascript
Stars: ✭ 1,346 (+5508.33%)
Mutual labels:  unit-testing, unit-test
Hexagonal-architecture-ASP.NET-Core
App generator API solution template which is built on Hexagnonal Architecture with all essential feature using .NET Core
Stars: ✭ 57 (+137.5%)
Mutual labels:  unit-testing, integration-testing
TestIt
Generate unit testing boilerplate from kotlin files.
Stars: ✭ 32 (+33.33%)
Mutual labels:  unit-testing, unit-test

NuGet License: MIT Build Status

SqlInMemory

SqlInMemory is a library for creating SqlServer database on Memory instead of hard disk, at last Drops and Disposes database when you're done with it. This is useful for Integration Testing.

Note : This library uses RamDisk which also uses ImDisk in the backend for creating virtual disk drive. Therefore you have to install imdisk first. (Download link of current stable version 2.0.10)

Get Started

1. Install Package

PM> Install-Package SqlInMemory

2. Use it

Pass your connection string and it will create (mount) a virtual disk drive 'Z' and create database there finaly when disposed, drop database and unmount drive.

var connectionString = "Data Source=.;Initial Catalog=TestDb;Integrated Security=true";
using (SqlInMemoryDb.Create(connectionString))
{
    //Use database using ADO.NET or ORM

    //For example using EF Core
    services.AddDbContext<AppDbContext>(opt => opt.UseSqlServer(connectionString));
    var serviceProvider = services.BuildServiceProvider();
    var appDbContext = serviceProvider.GetService<AppDbContext>();
    appDbContext.Database.Migrate();
    //...
}

Contributing

Create an issue if you find a BUG or have a Suggestion or Question. If you want to develop this project, Fork on GitHub and Develop it and send Pull Request.

A HUGE THANKS for your help.

License

SqlInMemory is Copyright © 2020 Mohammd Javad Ebrahimi under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].