Closed bliet closed 3 years ago
I am not able to reproduce the problem on the given source code. It would be nice if you could prepare a minimal project on which the problem can be reproduced and publish it on github.
Here is the repo. https://github.com/bliet/NetArchConstTestExample
And this is why I was unable to reproduce the problem, you are using NetArchTest.Rules v1.3.1, but the current version is v1.3.2 on which problem dose not exist anymore :)
Oh my bad, thanks.
Hello.
Description
We have defined a unit test with net arch test. The
OnlyHaveDependenciesOn
Method failed when the tested type has a const field. The IsSuccessful Property is false.Example:
Unfortunately I cannot attach a project file. Here the code.
The test class without any usings and a const field. By removing the "const" the test runs successfully.
NetArchtest:
Validation Helper:
Question
Is this a bug? Why the test failed?