Skip to content

Create FormObject Fluent Builder#74

Merged
scottolsonjr merged 3 commits into
mainfrom
39-create-a-formobject-faceted-fluent-builder
Mar 12, 2023
Merged

Create FormObject Fluent Builder#74
scottolsonjr merged 3 commits into
mainfrom
39-create-a-formobject-faceted-fluent-builder

Conversation

@scottolsonjr
Copy link
Copy Markdown
Contributor

This update introduces a fluent builder for FormObjects. This includes a nested/faceted builder for the CurrentRow and OtherRows or inserting a pre-defined RowObject. FieldObjects must be defined separately at this time. OtherRows may not be added until the FormObject is defined as MultipleIteration (false by default).

[TestMethod]
public void TestMethod1()
{
    var expected = "123";
    // FieldObject and RowObject definitions here 
    FormObject formObject = FormObject.Builder()
        .FormId(expected)
        .CurrentRow()
            .RowId("123||1")
            .Field(fieldObject1)
            .Field(fieldObject2)
            .AddRow()
        .MultipleIteration()
        .OtherRow()
            .RowId("123||2")
            .Field(fieldObject3)
            .Field(fieldObject4)
            .AddRow()
        .OtherRow(rowObject)
        .Build();
    Assert.AreEqual(expected, formObject.FormId);
}

…b.com:rarelysimple/RarelySimple.AvatarScriptLink into 39-create-a-formobject-faceted-fluent-builder
@scottolsonjr scottolsonjr added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 12, 2023
@scottolsonjr scottolsonjr added this to the v1.2 milestone Mar 12, 2023
@scottolsonjr scottolsonjr self-assigned this Mar 12, 2023
@scottolsonjr scottolsonjr linked an issue Mar 12, 2023 that may be closed by this pull request
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@scottolsonjr scottolsonjr merged commit 539a654 into main Mar 12, 2023
@scottolsonjr scottolsonjr deleted the 39-create-a-formobject-faceted-fluent-builder branch June 18, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a FormObject Faceted Fluent Builder

1 participant