Skip to content

Adding element to a property List without setter #120

Open
@vinigarcia87

Description

@vinigarcia87

He guys, trying to create a fixture like this one:

Fixture.of(ArrayOfResultBranchListDTO.class).addTemplate(BRANCH, new Rule() {{
    add("resultBranchListDTO", one(ResultBranchListDTO.class, ResultBranchListDTOTemplate.BRANCH));
}});

The class ArrayOfResultBranchListDTO is defined like this:

public class ArrayOfResultBranchListDTO {

    protected List<ResultBranchListDTO> resultBranchListDTO;

    public ArrayOfResultBranchListDTO() {
    }

    public List<ResultBranchListDTO> getResultBranchListDTO() {
        if (this.resultBranchListDTO == null) {
            this.resultBranchListDTO = new ArrayList();
        }

        return this.resultBranchListDTO;
    }
}

The code can't find the attribute resultBranchListDTO, I get the following error:

ArrayOfResultBranchListDTO-> No such attribute: resultBranchListDTO

I'm using version 3.1.0.

Can someone help me with this?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions