zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

10 results in tag: integration-testing

Dependency Injection in Asp.net core Integration testing

I successfully injected dependencies using Moq in my unit test project. But for the integration testI would like to interact with the database. So I canot fake the repositories/ dependencies. I am having trouble how to achieve such thing in seperate class...
asp.net-core-1.0 dependency-injection entity-framework-core integration-testing testing
asked by Avi-B

Add test data in integration tests

I'm writing integration tests for my .NET Core app using xUnit. I have various things I want to test, but for brevity I'll use this example. I need to test these things ("document" is just a string, I'm not dealing with files):...Register new employee...L...
asp.net-core c# entity-framework-core integration-testing xunit
asked by vaindil

How to test database actions in asp.net core integration test?

I am trying to integration test my app. ...for example, in my ...AbController... I have ...PostAb(AbDTO abDTO)... method, and I want to test that calling this method will add abDTO to db....now my test setup:... [SetUp] public void SetUp() { ...
asp.net-core dependency-injection entity-framework-core integration-testing
asked by arielorvits

Entity Framework Core DbUpdateException detailed information

I am just getting started with EF Core in my full .net 4.5.2 project and am trying to do an integration test to validate I can insert a new student. ...The issue is, I want to be able to get better information from the exception being thrown as to why it ...
c# entity-framework-core integration-testing
asked by Kurt Dowswell

Reconfigure dependencies when Integration testing ASP.NET Core Web API and EF Core

I'm following this tutorial...Integration Testing with Entity Framework Core and SQL Server...My code looks like this...Integration Test Class...public class ControllerRequestsShould : IDisposable { private readonly TestServer _server; private rea...
asp.net-core c# entity-framework-core integration-testing xunit2
asked by GreenyMcDuff

How to ensure that Entity Framework Core InMemory database is created per test method?

Dears, I am trying to create integration tests that tests my API controller using entity framework core in-memory database provider. I created ...CustomWebApplicationFactory... that configure my services, including my db context according to ...official d...
asp.net-core entity-framework-core in-memory-database integration-testing
asked by yo2011

ASP.NET Core integration tests

I'm following the pattern from this MS doc : ...https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-2.2...public class CustomWebApplicationFactory<TStartup> : WebApplicationFactory<Startup> { protected override IWebHost...
asp.net-core c# entity-framework-core integration-testing
asked by BaltoStar

ASP.NET MVC CORE web application integration tests with EF Core in-memory database - fresh database for each test

I am learning about ASP.NET Core 3 and have built a basic application. I am looking run integration tests to assert calls to the controllers read/write from the database correctly. To avoid having to rely on the actual database I am looking at using EF Co...
asp.net asp.net-core-mvc entity-framework entity-framework-core integration-testing
asked by Neil

TransactionScope not working with HttpClient in integration tests

Describe the bug...After upgrading from .net core 2.2 to 3.1, integration tests are failing.... All tests are wrapped in TransactionScope so that all changes to db should be revered (scope.Complete() is not called).... When call to the data access layer i...
asp.net-core entity-framework-core integration-testing
asked by Nenad Nikolic

How to write real integration test in .NET Core?

I have two questions, but let me start from the beginning. I have ASP.NET Core 3.1 WebAPI and I'm looking for the most optimal way to end-to-end test my controllers (...I don't want to use ...InMemory... provider...). I separated my tests in two sets: "Re...
.net-core asp.net-core-webapi entity-framework-core integration-testing tdd
asked by Ish Thomas

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!