コード例 #1
0
        public void TestCreation()
        {
            var behaviour = new FakeBehaviour {
                Type = BehaviourType.Order
            };

            Assert.IsTrue(Laws.Check(behaviour));
        }
コード例 #2
0
        public void TestPassingLaw3()
        {
            var behaviour = new FakeBehaviour {
                Type = BehaviourType.GeneratedBehaviour
            };

            Assert.IsTrue(Laws.Check(behaviour));
        }
コード例 #3
0
        public void TestPassingLaw2()
        {
            var behaviour = new FakeBehaviour {
                Type = BehaviourType.Order
            };

            Assert.IsTrue(Laws.Check(behaviour));
        }
コード例 #4
0
        public void TestCatchesBreakingLaw3()
        {
            var behaviour = new FakeBehaviour {
                Type = BehaviourType.GeneratedBehaviour
            };

            ((FakeModel)behaviour.Model).InjuresSelf = true;
            Assert.IsFalse(Laws.Check(behaviour));
        }
コード例 #5
0
        public void TestCatchesBreakingLaw1()
        {
            var behaviour = new FakeBehaviour {
                Type = BehaviourType.Order
            };

            ((FakeModel)behaviour.Model).InjuresHuman = true;
            Assert.IsFalse(Laws.Check(behaviour));
        }