public void PriorityShouldTrumpRead() { var a = new DependencyList("a", -1, deps => deps.Read <Position>()); var b = new DependencyList("b", 0, deps => deps.Read <Position>()); a.IsDependentOn(b).ShouldBe(false); b.IsDependentOn(a).ShouldBe(true); }
public void WriteIsNotDependentOnWriteWithAfter() { var a = new DependencyList("a", 0, deps => deps.Write <Position>().After("b")); var b = new DependencyList("b", 0, deps => deps.Write <Position>()); a.IsDependentOn(b).ShouldBe(true); b.IsDependentOn(a).ShouldBe(false); }
public void AfterShouldTrumpWrite() { var a = new DependencyList("a", 0, deps => deps.After("b").Write <Position>()); var b = new DependencyList("b", 0, deps => deps.Read <Position>()); a.IsDependentOn(b).ShouldBe(true); b.IsDependentOn(a).ShouldBe(false); }
public void WriteIsDependentOnWrite() { var a = new DependencyList("a", 0, deps => deps.Write <Position>()); var b = new DependencyList("b", 0, deps => deps.Write <Position>()); a.IsDependentOn(b).ShouldBe(true); b.IsDependentOn(a).ShouldBe(true); }
public void BeforeShouldTrumpWrite() { var a = new DependencyList("a", 0, deps => deps.Before("b")); var b = new DependencyList("b", 0, deps => deps.Write <Position>()); a.IsDependentOn(b).ShouldBe(false); b.IsDependentOn(a).ShouldBe(true); }