コード例 #1
0
        public void CanDelete_should_not_throw_exception_if_not_locked()
        {
            var command = new DeleteField {
                FieldId = 1
            };

            GuardSchemaField.CanDelete(command, schema_0);
        }
コード例 #2
0
        public void CanDelete_should_throw_exception_if_not_found()
        {
            var command = new DeleteField {
                FieldId = 3
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanDelete(schema_0, command));
        }
コード例 #3
0
        public void CanDelete_should_throw_exception_if_locked()
        {
            var command = new DeleteField {
                FieldId = 1
            };

            var schema_1 = schema_0.UpdateField(1, f => f.Lock());

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