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

ARQ-1204 #7

Closed
wants to merge 6 commits into from
Closed

ARQ-1204 #7

wants to merge 6 commits into from

Conversation

jmnarloch
Copy link
Member

I could have something that might interest you :-)

@buildhive
Copy link

An Innovative Testing Platform for the JVM » arquillian-extension-warp #22 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@buildhive
Copy link

An Innovative Testing Platform for the JVM » arquillian-extension-warp #23 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@buildhive
Copy link

An Innovative Testing Platform for the JVM » arquillian-extension-warp #24 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@lfryc
Copy link
Member

lfryc commented Dec 4, 2012

Fantastic job, Jakub!

Few questions/comments:

@jmnarloch
Copy link
Member Author

could you rebase changes on latest master? I can see pull request containing commits from history

Yeah. That was the first and the last time I was doing rebase through InteliJ ;)

what's intention of WarpRuntime? Does it serve same purpose with Warp class?

I wanted to fully seperate the implementation from the interface/API so I "inject" the implementation at runtime. Of course I could seperate that completly from the WarpClientActionBuilder, but I thought that it would be nice to have one extension class to which all API classes can delegate.

MethodMatcherBuilder can use HttpMethod "enum" instead of String

It does. :)

could you add sample of usage to https://github.com/arquillian/arquillian-extension-warp/blob/master/api/src/test/java/org/jboss/arquillian/warp/TestExecutionAPI.java ?

Sure.

Beside that I would like to introduce HttpHeaderFilterBuilder and implement not() function, that could be used as fallows:

request().url().contains("flavice.ico").not();

@lfryc
Copy link
Member

lfryc commented Dec 4, 2012

I wanted to fully seperate the implementation from the interface/API so I "inject" the implementation at runtime.

We do that with Warp, and tbh it doesn't matter if Warp delegates to WarpRuntime which gets populated at runtime or Warp is populated directly - both classes needs to be part of API anyway.

The only we could do would be use Service pattern, something like this: https://github.com/lfryc/arquillian-extension-warp/blob/ARQ-937/spi/src/main/java/org/jboss/arquillian/warp/spi/LifecycleManagerStore.java#L134

request().url().contains("flavice.ico").not();

Cool - just have in mind that it could be better readable: request().url().not().contains("favicon.ico")

@jmnarloch
Copy link
Member Author

We do that with Warp, and tbh it doesn't matter if Warp delegates to WarpRuntime which gets populated at runtime or Warp is populated directly - both classes needs to be part of API anyway.

The only we could do would be use Service pattern, something like this: https://github.com/lfryc/arquillian-extension-warp/blob/ARQ-937/spi/src/main/java/org/jboss/arquillian/warp/spi/LifecycleManagerStore.java#L134

JAX-RS give me the inspiration for creating the runtime delegate:
https://github.com/resteasy/Resteasy/blob/master/jaxrs/jaxrs-api/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java

So overall this is similar way of achieving the same goal. I just prefer to have single extension point rather to separately set all the classes: for example Warp and separately HttpFilters and so on.

Cool - just have in mind that it could be better readable: request().url().not().contains("favicon.ico")

Consider it done.

@lfryc
Copy link
Member

lfryc commented Dec 4, 2012

JAX-RS give me the inspiration for creating the runtime delegate

Ok, let's go ahead and make this happen!

@buildhive
Copy link

@buildhive
Copy link

@buildhive
Copy link

@buildhive
Copy link

@jmnarloch
Copy link
Member Author

Ok. I'm done.

First test running builder API got a green bar ;)

Warp
            .execute(new ClientAction() {
                public void action() {
                    browser.navigate().to(contextPath + "index.html");
                }
            })
            .filter(request().uri().not().contains("favicon.ico"))
            .verify(new ServerAssertion());

@lfryc
Copy link
Member

lfryc commented Dec 4, 2012

Fantastic, Ike loves green bars! :-)

public void testFilterBuilderUri() {
Warp
.execute(clientAction)
.filter(request().uri().endsWith(".jsf").build())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build() method is not necessary as I can see from BasicWarpTestm right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A, right I made the example before adding the overloaded filter() method.

@lfryc
Copy link
Member

lfryc commented Dec 5, 2012

Could you please create one unit test for request builder and one for URI matcher?


It looks awesome, this is huge addition and we will soon stretch its muscles in REST extension!

Looking forward for that! :-)

@buildhive
Copy link

@lfryc
Copy link
Member

lfryc commented Dec 11, 2012

Thanks for this fantastic feature, Jakub!
It was merged to master.

@lfryc lfryc closed this Dec 11, 2012
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

Successfully merging this pull request may close these issues.

3 participants