On 31 March 2017 at 12:33, Bruno Oliveira <bruno(a)abstractj.org> wrote:
I realized that while giving it a try, so thinking that we would like
to
refactor it to the core. Which classes we would like to see there?
* ClientBuilder.java
* CredentialBuilder.java
* ExecutionBuilder.java
* FederatedIdentityBuilder.java
* FlowBuilder.java
* GroupBuilder.java
* IdentityProviderBuilder.java
* RealmBuilder.java
* RoleBuilder.java
* RolesBuilder.java
* UserBuilder.java
* UserFederationProviderBuilder.java
For my selfish purposes I just need ClientBuilder, RealBuilder,
RoleBuilder and UserBuilder. But we may want to refactor more.
> Could even have a static method on ClientRepresentation#build/create or
something so it's easier to find.
That would be really nice.
I believe that RealmBuilder would be the tricky one to refactor, because
it depends on EventListenerProviderFactory (
https://github.com/abstractj/
keycloak/blob/fc9dbcf6cb1daa5e19bb3214012ed44154104cb0/testsuite/
integration-arquillian/servers/auth-server/services/
testsuite-providers/src/main/java/org/keycloak/testsuite/events/
EventsListenerProviderFactory.java#L29-L29).
Doesn't it just depend on that because of the test specify things it has in
it?
On Fri, Mar 31, 2017 at 4:49 AM Stian Thorgersen <sthorger(a)redhat.com>
wrote:
> An example of things that would need to be refactored:
>
https://github.com/abstractj/keycloak/blob/119435ac76c17d3a66590df0f87365
> f64e3395cd/testsuite/integration-arquillian/tests/base/src/test/java/org/
> keycloak/testsuite/util/RealmBuilder.java#L82
>
> On 31 March 2017 at 09:48, Stian Thorgersen <sthorger(a)redhat.com> wrote:
>
> Could even have a static method on ClientRepresentation#build/create or
> something so it's easier to find.
>
> On 31 March 2017 at 09:48, Stian Thorgersen <sthorger(a)redhat.com> wrote:
>
> Ideal would probably be keycloak-core, but that would require some
> refactoring, adding new missing things and also I'm not sure all builders
> should be included.
>
> On 30 March 2017 at 21:04, Bruno Oliveira <bruno(a)abstractj.org> wrote:
>
> Hi,
>
> While writing tests for the quickstarts, we started to create some code
> which I believe overlaps with the same thing ClientBuilder,
> RealmBuilder...and other do today[1]. I would like to expose these
> builders
> to make people's life easy.
>
> There are some options:
>
> 1. Move the builders available here[2] to keycloak-core.
> 2. Move it to keycloak-test-helper
> 3. Do nothing and duplicate code that matters into keycloak-test-helper
>
> I know that doing 1 or 2, is just silly if you think about quickstarts.
> But
> at the same time, others can benefit from a more fluent API, to
> programatically create users, realms...
>
> Thoughts?
>
> [1] -
>
https://github.com/keycloak/keycloak/blob/master/misc/
> keycloak-test-helper/src/main/java/org/keycloak/helper/TestsHelper.java
> [2] -
>
https://github.com/abstractj/keycloak/tree/119435ac76c17d3a66590df0f87365
> f64e3395cd/testsuite/integration-arquillian/tests/base/src/test/java/org/
> keycloak/testsuite/util
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>
>
>