You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @BenMorris , I have been playing with the NetArchTest and while doing so I have run into two cases that might look like a bug.
In first example I have used And condition where GetResult() IsSuccess is returning false with the empty FailingTypes list.
namespace Test
{
public class Dependency
{
}
public class ClassA
{
public Dependency Dep { get; set; }
}
}
namespace Test.B
{
public class ClassB
{
public Dependency Dep { get; set; }
}
}
...
var result = Types.InNamespace("Test")
.That()
.HaveDependencyOn(typeof(Dependency).FullName)
.Should()
.HaveName(typeof(ClassA).Name)
.And()
.ResideInNamespace(typeof(ClassB).Namespace)
.GetResult();
In second example I'm using Or condition where GetResult() IsSuccess is returning false but all three classes show up in a FailingTypes list.
namespace Test
{
public class Dependency
{
}
public class ClassA
{
public Dependency Dep { get; set; }
}
}
namespace Test.B
{
public class ClassB
{
public Dependency Dep { get; set; }
}
}
namespace Test.D
{
public class ClassD
{
public Dependency Dep { get; set; }
}
}
...
var result = Types.InNamespace("Test")
.That()
.HaveDependencyOn(typeof(Dependency).FullName)
.Should()
.HaveName(typeof(ClassA).Name)
.Or()
.ResideInNamespace(typeof(ClassB).Namespace)
.GetResult();
The text was updated successfully, but these errors were encountered:
Hi @BenMorris , I have been playing with the
NetArchTest
and while doing so I have run into two cases that might look like a bug.In first example I have used
And
condition where GetResult()IsSuccess
is returningfalse
with the emptyFailingTypes
list.In second example I'm using
Or
condition where GetResult()IsSuccess
is returningfalse
but all three classes show up in aFailingTypes
list.The text was updated successfully, but these errors were encountered: