Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
1 answer
106 views

Problem Description: I am working on a simple console application (Advent of Code) using .NET 10. I have set up an xUnit test project. The Issue: When I try to run tests in Visual Studio's Test ...
0 votes
0 answers
52 views

When I run my tests from the Solution Explorer (clicking "Run" from the tree), 13 tests from my test suite fail. This is 100% reproducible. When launching the same tests from the Test ...
0 votes
0 answers
111 views

I'm trying to add tests to my MAUI app. I added the xUnit test project to a separate namespace. The tests only run in the terminal with the dotnet test command. If I use the test explorer, it doesn't ...
1 vote
1 answer
124 views

I've been referencing a post here on Stack Overflow Is there a way to unit test top-level statements in C#? However, it hasn't helped. I'm trying to learn how to use xUnit testing in a C# console ...
Rod's user avatar
  • 4,583
5 votes
0 answers
247 views

I have a solution with many projects. When I run dotnet test, it selects all my xUnit projects and seems to correctly execute all of them. But at the last line of what dotnet test prints, the number ...
3 votes
1 answer
92 views

The code to be tested is as follows: //pseudo code public class ConnectionManager: IConnectionManager ( ILogService _logService; IConnector _iConnector; public ConnectionManager(...
Nitin S's user avatar
  • 7,711
2 votes
2 answers
110 views

I am attempting to test a repository method using a moq with a setup in the test. As far as I can tell, this is not testing the method but only testing the test. Here is an abbreviated version of the ...
1 vote
1 answer
117 views

I have a console app constructed using the following code: public partial class Program { private static async Task<int> Main(string[] args) { Host.CreateDefaultBuilder(args) ...
1 vote
0 answers
72 views

I am building a card game using Godot 4.5, with C#. I am trying to unit test a Card object that inherits from Node2D, but when I attempt to run the test, I get the following exception: Exception has ...
1 vote
1 answer
106 views

I am working with ASP.NET/.NET 4.8 application. My action method is as follows: public class TestController: System.Web.Http.ApiController { // pseudo code public async Task<...
0 votes
0 answers
110 views

I am trying to use XUnit for testing my f# code. module UnitTest1 open Xunit open Program open System.Diagnostics [<Fact>] let Test1 () = Debugger.Break() Assert.True(true) The test ...
2 votes
0 answers
74 views

I'm using .NET9.0. MRE: public class JTokenEqualityTests { [Fact] public void IntVsJToken_AssertEqual_ShouldFailButDoesnt() { int original = 42; JToken token = JToken....
0 votes
0 answers
33 views

In an xUnit theory I'd like to send an InlineData parameter of type string[][]. I can't seem to get it right. Is it doable, and if so, how? I would expect this to work at least: [InlineData(new string[...
1 vote
1 answer
126 views

I have been using Visual Studio 2022 Enterprise for a while (version 17.14.12 at the moment). When running unit tests, Verify.XUnitV3 used Visual Studio's internal diff tool when a test failed. After ...
0 votes
0 answers
82 views

I'm creating a new project with Keycloak and .NET Core 9. I've managed to get it working with my application, but I need to make it work with my integration tests. To integrate authorization and ...

15 30 50 per page
1
2 3 4 5
...
223

AltStyle によって変換されたページ (->オリジナル) /