public void CanEnable_should_throw_exception_if_ui_field() { var command = new EnableField { FieldId = 4 }; Assert.Throws <DomainException>(() => GuardSchemaField.CanEnable(command, schema_0)); }
public void CanEnable_should_throw_exception_if_not_found() { var command = new EnableField { FieldId = 3 }; Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanEnable(schema_0, command)); }
public void CanEnable_should_throw_exception_if_already_enabled() { var command = new EnableField { FieldId = 1 }; Assert.Throws <DomainException>(() => GuardSchemaField.CanEnable(schema_0, command)); }
public void CanShow_should_not_throw_exception_if_already_shown() { var command = new EnableField { FieldId = 1 }; var schema_1 = schema_0.UpdateField(1, f => f.Show()); GuardSchemaField.CanEnable(command, schema_1); }
public void CanEnable_should_throw_exception_if_locked() { var command = new EnableField { FieldId = 1 }; var schema_1 = schema_0.UpdateField(1, f => f.Lock()); Assert.Throws <DomainException>(() => GuardSchemaField.CanEnable(command, schema_1)); }
public void CanEnable_should_not_throw_exception_if_disabled() { var command = new EnableField { FieldId = 1 }; var schema_1 = schema_0.DisableField(1); GuardSchemaField.CanEnable(schema_1, command); }