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

Adding element to a property List without setter #120

Open
vinigarcia87 opened this issue Jan 27, 2023 · 0 comments
Open

Adding element to a property List without setter #120

vinigarcia87 opened this issue Jan 27, 2023 · 0 comments

Comments

@vinigarcia87
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant