Comments (2)
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.
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)
- Proposition: Mark as unlisted and Deprecated some old versions HOT 4
- Library is not compatible with .NET MAUI 8.0.6 HOT 4
- How can I pass event args to event with Func<TEventArgs, Task>? HOT 2
- Add ability to capture and verify on an argument at the same time HOT 1
- Provide more intuitive methods HOT 3
- NSubstitute.Exceptions.SubstituteInternalException HOT 1
- IMemoryCache TryGetValue mocking not working HOT 2
- Unable to match arguments whose type is generic, when their concrete type is not known HOT 1
- Arg.Any<Arg.AnyType>() does not match arguments passed by reference
- Provide a way to pass null for custom event args so that Raise.EventWith can be used to raise events for custom event args without a default constructor
- I can't test code that has dbcontext.SomeEntity.SingleOrDefault() HOT 2
- I'm receiving NSubstitute.Exceptions.NotASubstituteException when I shouldn't HOT 3
- Need to release 5.2.0 HOT 6
- Configured calls to 'hidden' properties are not matched HOT 2
- Improve output for expected argument for custom argument matchers on non-match or make it customizable HOT 8
- Open issues that could be closed? HOT 8
- Ability to mock requests from Protected methods in sequences HOT 1
- Proposal: Replace Google groups with GitHub discussions HOT 7
- .When(...).Throws gives a CouldNotSetReturnDueToNoLastCallException HOT 1
- ReceivedCallsException despite the expected and actual calls being identical. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsubstitute.