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 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); }