Giter Site home page Giter Site logo

Comments (2)

Semyonis avatar Semyonis commented on June 7, 2024 1

Thanks for your detailed answer during new year holidais!

Well, non of this really helped me. Changing the name did not affect workflow at all. The result stayed the same.

Settin up CopyLocalLockFileAssemblies property switched focus to another dependency. Now it can't find tthis :
package: 'NuGet.Frameworks', version: '6.5.0'
path: 'lib/netstandard2.0/NuGet.Frameworks.dll'

So i still searching for any workaround. But at least. thanks to your comment, I realized that it's not the NSub issue. I do not like the idea to manualy specify the list of test proj-s for 'dotnet test' command.

I see problems with Integrations and Units but it is not in my focus for now. I actualy haven't had any usues with it because I relied on IDEs (VS, Rider) mechanisms for starting solution tests and they worked well and still have been working without any problem.

While I wrote this comment I realized issue core. It's arise because of xunit dependency in Arc.Tests.Base proj. I removed it and issue gone.

Thanks a lot for you help!

from nsubstitute.

alexandrnikitin avatar alexandrnikitin commented on June 7, 2024

Thank you for the issue.
It's not a problem with NSubstitute, Castle.Core or .NET6 but with your test setup.

dotnet test fails at Arc.Tests.Base project which is a class library. It doesn't copy NuGet dependencies by default. See the CopyLocalLockFileAssemblies property if you want to do that.
But you probably don't want to enable it since (I assume) it isn't supposed to have tests. Most probably it is picked by dotnet test because its name matches **Tests** pattern. To mitigate that just rename the project or run dotnet test on projects explicitly. dotnet test Arc.Tests.Integrations passes without errors because it's a console app and it copies all NuGet dependencies to the output directory.

Another issue with the test project setup is that there's no test runner specified. The above test command give the following warning

No test is available in C:\Users\nikit\sources\temp\Arc\Arc.Tests.Integrations\bin\Debug\net8.0\Arc.Tests.Integrations.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example  /TestAdapterPath:<pathToCustomAdapters>.

You need to add a reference to the xunit runner.
See the xunit documentation for details https://xunit.net/docs/getting-started/netcore/cmdline
or https://xunit.net/docs/getting-started/netcore/visual-studio

Hope it helps. Let us know if it doesn't.

from nsubstitute.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.