I have a problem writing my unit test in C# using Moq and xUnit. In my service I have the following code: var options = new TokenCredentialOptions { Authori
I want to use WebApplicationFactory to create hosts for my tests, but I want to create 2 Web Application Factories for two projects I refereed in single XUnit t
I've got extension methods in .net core that effectively dynamically evaluate stuff, and will call .Include() on an IQueryable<T>. I'd like to build unit
I have a new issue working on migrating my Xunit integration test on .net core 3.0. I moved the project in a subfolder and now I have a DirectoryNotFoundExcepti
I'm writing unit test. For testing the method below, public async Task<Guid> CreateWebJobStatus(string blobId, Guid loggedInUserId, string loggedInUserE
I am having an issue that I've been many days unable to resolve. I use xUnit with a given-then-when abstraction to make tests more readable. I am using a wrappe
I have a small .NET Core project, where the complete build/test/deploy process is handled in a Cake script. I have a powershell script that runs the cake scrip
.NET Core configuration allows so many options to add values (environment variables, json files, command line args). I just can't figure out and find an answer
I have an Asp.net Core method with below definition. [HttpPost] public IActionResult Upload(IFormFile file) { if (file == null || file.Length == 0)
I have Selenium tests which are run by XUnit. I write tests on c#. Some of the tests are not stable (especially those which uses mouse actions). I found the Ret
I have a test class with a constructor that needs an IService. public class ConsumerTests { private readonly IService _service; public ConsumerTests(IS
I initially used the Moq library for testing, since I don't actually want to mess the data in my database. However, I quickly realized instead of running the co
Can I use the ITestoutputHelper injected object to get the calling class name?
I'm learning xUnit and so far, have found it to be a most useful tool. It's making me rethink some of my coding tactics to TDD instead. However, I've come acro
I have a .net core 2.2 applications which is using a SQL database. I have written some unit tests using EF Core In Memory provider to test my data access code.
Is there a way to run a data driven XUnit test using a CSV file as the data source? I've tried Cavity.Data.XUnit, but it's no longer compatible with the newest
I've developed a wpf-mvvm application that uses wmi to document what is built into a given Computer into a json file. I've used the mvvm model to develop the ap
The latest xunit framework does not allow test runners in library code when compiled with .Net Core framework (this is allowed for normal Visual Studio code). T
The latest xunit framework does not allow test runners in library code when compiled with .Net Core framework (this is allowed for normal Visual Studio code). T
Xunit has a nice feature: you can create one test with a Theory attribute and put data in InlineData attributes, and xUnit will generate many tests, and test th