public void CanDisable_should_throw_exception_if_ui_field() { var command = new DisableField { FieldId = 4 }; Assert.Throws <DomainException>(() => GuardSchemaField.CanDisable(command, schema_0)); }
public void CanDisable_Should_not_throw_exception_if_enabled() { var command = new DisableField { FieldId = 1 }; GuardSchemaField.CanDisable(schema_0, command); }
public void CanDisable_should_throw_exception_if_not_found() { var command = new DisableField { FieldId = 3 }; Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanDisable(schema_0, command)); }
public void CanDisable_should_not_throw_exception_if_already_disabled() { var command = new DisableField { FieldId = 1 }; var schema_1 = schema_0.UpdateField(1, f => f.Disable()); GuardSchemaField.CanDisable(command, schema_1); }
public void CanDisable_should_throw_exception_if_locked() { var command = new DisableField { FieldId = 1 }; var schema_1 = schema_0.UpdateField(1, f => f.Lock()); Assert.Throws <DomainException>(() => GuardSchemaField.CanDisable(command, schema_1)); }
public void CanDisable_should_throw_exception_if_already_disabled() { var command = new DisableField { FieldId = 1 }; var schema_1 = schema_0.DisableField(1); Assert.Throws <DomainException>(() => GuardSchemaField.CanDisable(schema_1, command)); }