About 10,000 results
Open links in new tab
  1. Testing Database Integrations in .NET with xUnit - Medium

    The database you use for testing should be separate from the database you use for your application to make sure your test cases are isolated, as well as prevent your tests from …

  2. How to write unit tests for database calls - Stack Overflow

    Aug 2, 2009 · For that, you want to use something like dbunit (which allows you to set up a baseline and compare a result set to an expected result set), or possibly do your testing wholly …

  3. How to use DbContext inside xUnit Test project? - Stack Overflow

    Mar 23, 2018 · Usually what you do in unit tests is that you create a mock of your database as you do not want to test the database in your unit tests that is what your integration tests is used for. …

  4. c# - How to mock Db connection in xunit? - Stack Overflow

    Feb 18, 2019 · You should adhere to Interface Segregation and Dependency Inversion principle by using Inversion of Control with the help of Dependency Injection. This way, you can create …

  5. XUnit – Part 6: Testing The Database with xUnit Custom Attributes

    Feb 16, 2020 · In this post, we saw how we can create a custom attribute that can help us in testing the database with xUnit. We saw how we can do that for both Sql server and oledb.

  6. SQL Server integration testing using xUnit

    Apr 2, 2020 · In this post I will demonstrate how to use SQL Server LocalDB to automate database integration tests using xUnit. Let’s start with a simple fixture that will create a …

  7. Testing With Databases at XUnitPatterns.com

    This can be done using xUnit framework extensions for database testing (such as DbUnit for JUnit) to insert data directly into the database (for "Read tests") or to verify the post-test …

  8. Unit Testing in C# with xUnit code example | Medium

    Apr 11, 2024 · Unit testing is a software testing methodology where individual units or components of a software application are tested in isolation to ensure they function correctly. …

  9. Unit Test Your Database Classes - CodeProject

    May 16, 2022 · In this article, we explain how to create a database access class that is unit test friendly and is done with plain ADO.NET classes without the necessity of more complex …

  10. xUnit test using data coming from external file - Stack Overflow

    May 1, 2019 · InlineData, ClassData and MemberData all derive from DataAttribute, which you can extend yourself to create a custom data source for a data theory, in which you may read …

  11. Some results have been removed
Refresh