DWR

Add test cases for enum conversion

Details

  • Type: Task Task
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0.5, 3.0.M1, 3.0.RC1
  • Fix Version/s: 3.0.1
  • Component/s: testdwr.war
  • Documentation Required:
    No

Activity

Hide
Deno Vichas added a comment - 31/May/09 4:43 AM

patch for enum converter that fixes null inbound not return null and outbound not throwing a ConversionException and a test case for the enum converter.

Show
Deno Vichas added a comment - 31/May/09 4:43 AM patch for enum converter that fixes null inbound not return null and outbound not throwing a ConversionException and a test case for the enum converter.
Hide
Deno Vichas added a comment - 31/May/09 4:56 AM

crap... i just uploaded the wrong version. these two should be the correct ones.

Show
Deno Vichas added a comment - 31/May/09 4:56 AM crap... i just uploaded the wrong version. these two should be the correct ones.
Hide
David Marginian added a comment - 31/May/09 5:16 AM

Deno,

First off thanks. Now a few things:

Have you seen the testdwr project in subversion? It is a web based testing application that allows us to test both the server and the client. We have quite an extensive listing of test-cases and this is what I meant by adding a test case (not a standalone Junit test). I recommend you download the app and if possible add the test case there. Otherwise I can do it (let me know).

Secondly, I am happy you are helping out but before you do the work you should re-assign the issue (if you can) or just let me know you want to work on it and I will assign it to you. That way we don't duplicate work.

Lastly, regarding the changes to the Enum converter it appears the changes you have made affect the documentation (for the inbound conversion):

http://directwebremoting.org/dwr/server/dwrxml/converters/enum.html
If no match is found in the given enum, then an exception will be thrown.

I am assuming a ConversionException was being thrown on the inbound side before (instead of null)? Is that correct?

The changes to the outbound side look good.

Show
David Marginian added a comment - 31/May/09 5:16 AM Deno, First off thanks. Now a few things: Have you seen the testdwr project in subversion? It is a web based testing application that allows us to test both the server and the client. We have quite an extensive listing of test-cases and this is what I meant by adding a test case (not a standalone Junit test). I recommend you download the app and if possible add the test case there. Otherwise I can do it (let me know). Secondly, I am happy you are helping out but before you do the work you should re-assign the issue (if you can) or just let me know you want to work on it and I will assign it to you. That way we don't duplicate work. Lastly, regarding the changes to the Enum converter it appears the changes you have made affect the documentation (for the inbound conversion): http://directwebremoting.org/dwr/server/dwrxml/converters/enum.html If no match is found in the given enum, then an exception will be thrown. I am assuming a ConversionException was being thrown on the inbound side before (instead of null)? Is that correct? The changes to the outbound side look good.
Hide
Deno Vichas added a comment - 31/May/09 5:34 AM

re: testdwr;
i didn't know about this. is there anything special about this? who are the other intellij users? i'm having problem getting dwr just to build correctly with intellij. ant works.

re: assignment;
i can't re-assing things in jira. i have just a basic account.

re: exception;
oh, i haven't seen that doc. it was throwing a ConversionException before the change. shouldn't all the converts have the same behavior when passing in null?

i was going to look at http://bugs.directwebremoting.org/bugs/browse/DWR-351 next if nobody else is. i've been looking for small quick things do to.

Show
Deno Vichas added a comment - 31/May/09 5:34 AM re: testdwr; i didn't know about this. is there anything special about this? who are the other intellij users? i'm having problem getting dwr just to build correctly with intellij. ant works. re: assignment; i can't re-assing things in jira. i have just a basic account. re: exception; oh, i haven't seen that doc. it was throwing a ConversionException before the change. shouldn't all the converts have the same behavior when passing in null? i was going to look at http://bugs.directwebremoting.org/bugs/browse/DWR-351 next if nobody else is. i've been looking for small quick things do to.
Hide
David Marginian added a comment - 31/May/09 2:37 PM

re: testdwr;
Well it is our testing framework so all new tests should go into it. It is not documented but pretty straightforward to figure out. If you want to take a stab at adding the enum test case there let me know and I will assign this issue to you.

re: Intellij
To my knowledge no one is using IntelliJ. However, DWR is such a simple project to set-up I don't see how you can't get it to build.

re:assignment
I have added you as a developer and assigned 351 to you.

Show
David Marginian added a comment - 31/May/09 2:37 PM re: testdwr; Well it is our testing framework so all new tests should go into it. It is not documented but pretty straightforward to figure out. If you want to take a stab at adding the enum test case there let me know and I will assign this issue to you. re: Intellij To my knowledge no one is using IntelliJ. However, DWR is such a simple project to set-up I don't see how you can't get it to build. re:assignment I have added you as a developer and assigned 351 to you.
Hide
Deno Vichas added a comment - 31/May/09 8:47 PM

re: testdwr;

after checking out testdwr and running the ant tasks it looks like i need to have dwr and testdwr in the same base dir. is there any docs on the needed dir structure for everything? am i correct in think it needs to be;

\dwr-project
.. \dwr
.. \testdwr

Show
Deno Vichas added a comment - 31/May/09 8:47 PM re: testdwr; after checking out testdwr and running the ant tasks it looks like i need to have dwr and testdwr in the same base dir. is there any docs on the needed dir structure for everything? am i correct in think it needs to be; \dwr-project .. \dwr .. \testdwr
Hide
David Marginian added a comment - 01/Jun/09 2:38 AM

I am assuming you are talking about setting up intellij? For Eclipse I have two separate projects. However, testdwr depends on dwr so I have a project dependency (this saves me from having to have the dwr.jar in my path for testdwr).

Show
David Marginian added a comment - 01/Jun/09 2:38 AM I am assuming you are talking about setting up intellij? For Eclipse I have two separate projects. However, testdwr depends on dwr so I have a project dependency (this saves me from having to have the dwr.jar in my path for testdwr).
Hide
Deno Vichas added a comment - 01/Jun/09 4:06 AM

i was asking more due to ant script. there's a dwr.home property that assume the dwr project is in a certain location.

<property name="dwr.home" value="${basedir}/../dwr"/>

is there any other things like this i should know about? i'm not use to having my ant script depend on things outside its project. at work we use maven tasks for ant to publish a version jar from our common project to our projects that depend on it. so when you build a depend project it grabs the jar from your local repo. you just got to make sure build and publish the commons first. in our IDEs we link the projects and exclude the jar that ant sticks in the lib dir.

Show
Deno Vichas added a comment - 01/Jun/09 4:06 AM i was asking more due to ant script. there's a dwr.home property that assume the dwr project is in a certain location. <property name="dwr.home" value="${basedir}/../dwr"/> is there any other things like this i should know about? i'm not use to having my ant script depend on things outside its project. at work we use maven tasks for ant to publish a version jar from our common project to our projects that depend on it. so when you build a depend project it grabs the jar from your local repo. you just got to make sure build and publish the commons first. in our IDEs we link the projects and exclude the jar that ant sticks in the lib dir.
Hide
David Marginian added a comment - 01/Jun/09 4:34 AM

There is an assumption that the testdwr and the dwr project are in the same directory (an assumption that makes a lot of sense, which is probably why I never noticed it). I am not aware of any other dependencies.

Show
David Marginian added a comment - 01/Jun/09 4:34 AM There is an assumption that the testdwr and the dwr project are in the same directory (an assumption that makes a lot of sense, which is probably why I never noticed it). I am not aware of any other dependencies.
Hide
David Marginian added a comment - 06/Apr/11 5:18 AM

Matt another one you could work on (not a priority).

1) Add Enum conversion test case.
2) Add a test to the testdwr project.

Show
David Marginian added a comment - 06/Apr/11 5:18 AM Matt another one you could work on (not a priority). 1) Add Enum conversion test case. 2) Add a test to the testdwr project.

People

Dates

  • Created:
    06/May/09 6:27 AM
    Updated:
    10/Apr/11 5:18 PM