public void CanShow_should_throw_exception_if_ui_field() { var command = new ShowField { FieldId = 4 }; Assert.Throws <DomainException>(() => GuardSchemaField.CanShow(command, schema_0)); }
public void CanShow_should_throw_exception_if_already_visible() { var command = new ShowField { FieldId = 4 }; Assert.Throws <DomainException>(() => GuardSchemaField.CanShow(schema_0, command)); }
public void CanShow_should_throw_exception_if_not_found() { var command = new ShowField { FieldId = 3 }; Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanShow(schema_0, command)); }
public void CanShow_should_throw_exception_if_locked() { var command = new ShowField { FieldId = 1 }; var schema_1 = schema_0.UpdateField(1, f => f.Lock()); Assert.Throws <DomainException>(() => GuardSchemaField.CanShow(command, schema_1)); }
public void CanShow_should_not_throw_exception_if_hidden() { var command = new ShowField { FieldId = 1 }; var schema_1 = schema_0.HideField(1); GuardSchemaField.CanShow(schema_1, command); }