コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }