Mock کردن HttpClient برای تست نویسی توسط کتابخانه MockHttp
200, OK
https://github.com/richardszalay/mockhttp icon

MockHttp is a testing layer for Microsoft's HttpClient library. It allows stubbed responses to be configured for matched HTTP requests and can be used to test your application's service layer. 

var mockHttp = new MockHttpMessageHandler();

// Setup a respond for the user api (including a wildcard in the URL)
mockHttp.When("http://localhost/api/user/*")
        .Respond("application/json", "{'name' : 'Test McGee'}"); // Respond with JSON

// Inject the handler or client into your application code
var client = mockHttp.ToHttpClient();

var response = await client.GetAsync("http://localhost/api/user/1234");
// or without async: var response = client.GetAsync("http://localhost/api/user/1234").Result;

var json = await response.Content.ReadAsStringAsync();

// No network connection required
Console.Write(json); // {'name' : 'Test McGee'}


Mock کردن HttpClient برای تست نویسی توسط کتابخانه MockHttp
ساخت دیتابیس یکبار مصرف Mongo بدون نیاز به نصب آن!
200, OK
https://github.com/Mongo2Go/Mongo2Go icon

توسط این کتابخانه می‌توانید دیتابیس‌های MongoDb را بدون نیاز به نصب آن‌ها، به صورت یکبار مصرف ایجاد کنید. یعنی یک دیتابیس موقت (در پوشه Temp سیستم عامل) برای شما می‌سازد و در آخر وقتی کار شما با آن تمام شد، آن را حذف می‌کند. در نتیجه برای Integration Testing بسیار مناسب و کاربردی هست. 


طرز کار با آن خیلی ساده‌است؛ فقط کافی است بسته‌ی NuGet آن را نصب کنید:

Install-Package Mongo2Go

و به صورت زیر از آن استفاده کنید:

using (var runner = MongoDbRunner.Start())
{
   var client = new MongoClient(runner.ConnectionString);
   var database = client.GetDatabase("IntegrationTest");
   var collection = database.GetCollection<TestDocument>("TestCollection");
   //Just use it!
}
ساخت دیتابیس یکبار مصرف Mongo بدون نیاز به نصب آن!
ساخت دیتابیس SqlServer بر روی Memory به جای Hard Disk
200, OK
https://github.com/mjebrahimi/SqlInMemory icon

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. 

ساخت دیتابیس SqlServer بر روی Memory به جای Hard Disk
با MyTested.AspNetCore.Mvc، برای پروژه‌های ASP.NET Core ساده‌تر تست بنویسید
200, OK
https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc icon

MyTested.AspNetCore.Mvc is a strongly-typed unit testing library providing an easy fluent interface to test the ASP.NET Core MVC framework. It is testing framework agnostic so that you can combine it with a test runner of your choice (e.g. xUnit, NUnit, etc.). 

با MyTested.AspNetCore.Mvc، برای پروژه‌های ASP.NET Core ساده‌تر تست بنویسید