public void CanDelete_should_not_throw_exception_if_not_locked() { var command = new DeleteField { FieldId = 1 }; GuardSchemaField.CanDelete(command, schema_0); }
public void CanDelete_should_throw_exception_if_not_found() { var command = new DeleteField { FieldId = 3 }; Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanDelete(schema_0, command)); }
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)); }