rhbz1110627 zanata init

https://bugzilla.redhat.com/show_bug.cgi?id=1110627
and https://bugzilla.redhat.com/show_bug.cgi?id=1038852

Depends on https://github.com/zanata/zanata-api/pull/15 and https://github.com/zanata/zanata-server/pull/520
It's only for testing. Try to minimize number of these type of methods as well as enforce both values being set. 

----- Original Message -----

> From: "David Mason" <notifications@github.com>
> To: "zanata/zanata-client" <zanata-client@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Friday, July 18, 2014 1:29:26 PM
> Subject: Re: [zanata-client] rhbz1110627 zanata init (#27)

> In
> zanata-client-commands/src/main/java/org/zanata/client/commands/init/ProjectPrompt.java:
> > +                                @Override
> > +                                public boolean apply(Project input) {
> > +                                    return input.getStatus() ==
> > +                                            EntityStatus.ACTIVE;
> > +                                }
> > +                            }));
> > +            filteredProjects = ImmutableList.copyOf(allProjects);
> > +        }
> > +    }
> > +
> > +    @VisibleForTesting
> > +    protected void setAllAndFilteredProjects(List<Project> allProjects,
> > +            List<Project> filteredProjects) {
> > +        this.allProjects = allProjects;
> > +        this.filteredProjects = filteredProjects;
> > +    }

> Why does this do two things? I am not sure of the value of this over separate
> setAllProjects(...) and setFilteredProjects(...) methods - this way makes
> the name confusing.

> —
> Reply to this email directly or view it on GitHub .