Exemplo n.º 1
0
        public void CanDelete_should_not_throw_exception_if_not_locked()
        {
            var command = new DeleteField {
                FieldId = 1
            };

            GuardSchemaField.CanDelete(schema_0, command);
        }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
        public void CanDelete_should_throw_exception_if_locked()
        {
            var command = new DeleteField {
                FieldId = 1
            };

            var schema_1 = schema_0.LockField(1);

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