We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BeAssignableTo
My ArchUnit tests test for assignability across multiple layers of inheritance, like so:
// Assembly 1 public class Parent; // Assembly 2 public class Child : Parent; // Assembly 3 public class Grandchild : Child; // ArchUnit test public class Tests { private static readonly Architecture Architecture = new ArchLoader() .LoadAssemblies(typeof(Parent).Assembly, typeof(Child).Assembly, typeof(Grandchild).Assembly) .Build(); [Fact] public void Test() { Classes().That().Are(typeof(Grandchild)) .Should().BeAssignableTo(typeof(Parent)) .Check(Architecture); } }
(I created a minimal example, which you can find here: https://github.com/tnotheis/archunit-bug-example)
With version 0.11.0 this worked just fine. But since I upgraded to version 0.11.1, the test fails with the following error:
AssemblyOfGrandchild.Grandchild is not assignable to "AssemblyOfParent.Parent"
It only fails if Child and Grandchild reside in different assemblies. If you move the Grandchild class into AssemblyOfChild the test passes.
Child
Grandchild
AssemblyOfChild
The text was updated successfully, but these errors were encountered:
No branches or pull requests
My ArchUnit tests test for assignability across multiple layers of inheritance, like so:
(I created a minimal example, which you can find here: https://github.com/tnotheis/archunit-bug-example)
With version 0.11.0 this worked just fine. But since I upgraded to version 0.11.1, the test fails with the following error:
It only fails if
Child
andGrandchild
reside in different assemblies. If you move theGrandchild
class intoAssemblyOfChild
the test passes.The text was updated successfully, but these errors were encountered: