Example #1
0
        public void ItDoesntCrashIfNobodyIsWaiting()
        {
            var unity            = Substitute.For <UnityObject>();
            var conflictResolver = Substitute.For <ConflictResolver>();
            var unit             = new StandardUnit(conflictResolver, unity);

            unit.PickMe();
        }
        public void ItDoesntCrashIfNobodyIsWaiting()
        {
            var unity = Substitute.For<UnityObject>();
            var conflictResolver = Substitute.For<ConflictResolver>();
            var unit = new StandardUnit(conflictResolver, unity);

            unit.PickMe();
        }
Example #3
0
        public void ItFiresWaitingForPickMe()
        {
            var unity            = Substitute.For <UnityObject>();
            var conflictResolver = Substitute.For <ConflictResolver>();
            var unit             = new StandardUnit(conflictResolver, unity);

            bool waiting = false;

            unit.Waiting += () => waiting = true;

            unit.PickMe();

            Assert.IsTrue(waiting);
        }
        public void ItFiresWaitingForPickMe()
        {
            var unity = Substitute.For<UnityObject>();
            var conflictResolver = Substitute.For<ConflictResolver>();
            var unit = new StandardUnit(conflictResolver, unity);

            bool waiting = false;
            unit.Waiting += () => waiting = true;

            unit.PickMe();

            Assert.IsTrue(waiting);
        }