コード例 #1
0
        public void LockField_should_throw_exception_if_not_found()
        {
            var command = new LockField {
                FieldId = 3
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanLock(schema_0, command));
        }
コード例 #2
0
        public void CanLock_should_not_throw_exception_if_not_locked()
        {
            var command = new LockField {
                FieldId = 1
            };

            GuardSchemaField.CanLock(schema_0, command);
        }
コード例 #3
0
        public void CanLock_should_throw_exception_if_already_locked()
        {
            var command = new LockField {
                FieldId = 1
            };

            var schema_1 = schema_0.LockField(1);

            Assert.Throws <DomainException>(() => GuardSchemaField.CanLock(schema_1, command));
        }