Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a FieldObject Fluent Builder #37

Closed
scottolsonjr opened this issue Jan 7, 2023 · 0 comments · Fixed by #72
Closed

Create a FieldObject Fluent Builder #37

scottolsonjr opened this issue Jan 7, 2023 · 0 comments · Fixed by #72
Labels
enhancement New feature or request
Milestone

Comments

@scottolsonjr
Copy link
Contributor

Constructing ScriptLink objects can be complicated and difficult to read. Especially, with a large number of properties and nested classes. This request proposes using a Fluent Builder pattern to help with the construction of FieldObjects. This will make it easier to write unit tests and add new FieldObjects to existing rows.

// Basic Idea
FieldObject fieldObject = FieldObject.Builder().FieldNumber("1").FieldValue("Something").Enabled().Required().Build();
// Alternative builder initialization since every fieldobject must have a field number
FieldObject fieldObject = FieldObject.Builder("1").FieldValue("Something").Enabled().Required().Build();

The object builders are split into separate issues so help with testing, validation, documentation, and code review.

@scottolsonjr scottolsonjr added the enhancement New feature or request label Jan 7, 2023
@scottolsonjr scottolsonjr added this to the v1.2 milestone Jan 7, 2023
@scottolsonjr scottolsonjr linked a pull request Feb 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant