Hi Dimuthu, First, I suspect that when the test says 205, it should be 405... method not allowed. See [1] and also the RO spec. In case it's not clear... the point is that these representations only respond to HTTP GET; calling them with any other HTTP verb is a client-side error.
Second, if that's the case, then I suspect it may be necessary to define new methods in the XxxServerSide class (you didn't say which resource you are testing), and just have it return a 405. I forget how that's done, it's probably a matter of throwing some sort of an exception. Have a look at some of the action invoke tests that are passing that do return a 4xx code, to see how they work. HTH Dan [1] http://en.wikipedia.org/wiki/List_of_HTTP_status_codes On 14 June 2013 20:14, DImuthu Upeksha <[email protected]> wrote: > Hi Dan > Now I'm focusing > on Delete_thenResponseCode_205_bad_TODO, Post_thenResponseCode_205_bad_TODO, > and Put_thenResponseCode_205_bad_TODO tests. When I send requests using > above http methods (Delete, put and post) it sends a response with code 500 > (Server error). I tried this using both test codes and REST console of > chrome. But actually what I need is 205. It seems like jetty refuses > requests other than http GET. How can I rectify this issue? > > Thanx > Dimuthu > > > On Tue, Jun 11, 2013 at 12:42 PM, Dan Haywood < > [email protected]> wrote: > >> Yup, correct. >> >> cheers >> Dan >> >> >> >> >> On 11 June 2013 19:52, DImuthu Upeksha <[email protected]>wrote: >> >>> Hi Dan >>> I'm working on Get_thenRepresentation_ok_TODO tests. I need to verify >>> the parts of the RO spec which are mapped to each test. >>> >>> >>> --------------------------------------------------------------------------- >>> org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.Get_thenRepresentation_ok_TODO >>> : 18 ACTION RESOURCE & REPRESENTATION >>> >>> org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property.Get_thenRepresentation_ok_TODO >>> : 16 PROPERTY RESOURCE & REPRESENTATION >>> >>> org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection.Get_thenRepresentation_ok_TODO >>> : 17 COLLECTION RESOURCE & REPRESENTATION >>> >>> >>> -------------------------------------------------------------------------- >>> >>> Are these relations correct or do they belong to some other part of the >>> spec? >>> >>> Thank you >>> Dimuthu >>> >>> >>> On Sat, Jun 8, 2013 at 8:39 AM, Dan Haywood < >>> [email protected]> wrote: >>> >>>> Hi Dimuthu, >>>> >>>> >>>> On 8 June 2013 14:43, DImuthu Upeksha <[email protected]>wrote: >>>> >>>>> Hi Dan, >>>>> Sorry for late response. I was bit busy with exams for last 3 days. >>>>> >>>> >>>> Yes, I do appreciate you are still in the midst of your term. Glad >>>> you've found time to do some of these tests, then. >>>> >>>> >>>> >>>>> However I managed to get into code and write some tests to get idea >>>>> about the structure. I wrote all remaining >>>>> "Get_thenResponseCode_200_TODO" tests. >>>>> >>>>> >>>> These sound like good, nice and simple tests to get started with. >>>> >>>> >>>> >>>> >>>>> And there is an issue in >>>>> >>>>> "org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.Get_thenRepresentation_ok_TODO" >>>>> >>>>> Line 64 >>>>> >>>>> actionPrompt("OID","1", "list") -: Test fails because there is no no >>>>> domain type called OID >>>>> >>>>> >>>> Yes, that does sound sounds suspect. You ought to be able to find one >>>> of the existing domain types (eg PRMV is the PrimitiveValuedEntity, if I >>>> recall correctly) and do the prompt against that instead. >>>> >>>> >>>> >>>> >>>>> >>>>> I need you to verify what I has written to make sure I'm in correct >>>>> path. How can I submit the changes I have done? >>>> >>>> >>>> OK; you need to generate patch files using either github's tools or >>>> just the git diff command. There's some documentation on the process here >>>> [1]. >>>> >>>> When you've generated your patch files, attach them to the JIRA ticket >>>> [2], so that I can review them and apply them. I'll provide some feedback >>>> at that point. >>>> >>>> >>>> >>>>> Next I expect to >>>>> implement remaining "Get_thenRepresentation_ok_TODO" tests. >>>>> >>>>> >>>> Sounds good. I would imagine that you would need to check for the >>>> correct representation for actions that take no arguments, take 1 arg, take >>>> 2 args, take arguments of the different datatypes. You might want to >>>> extend one of the existing TCK DOM services for this (that's what I would >>>> be doing if I couldn't find anything suitable). >>>> >>>> Thx >>>> Dan >>>> >>>> [1] http://isis.apache.org/contributors/contributing.html >>>> [2] https://issues.apache.org/jira/browse/ISIS-421 >>>> >>>> >>>> >>>>> Thank you >>>>> Dimuthu >>>>> >>>>> >>> >>> >>> -- >>> Regards >>> >>> W.Dimuthu Upeksha >>> Undergraduate >>> Department of Computer Science And Engineering >>> >>> University of Moratuwa, Sri Lanka >>> >> >> > > > -- > Regards > > W.Dimuthu Upeksha > Undergraduate > Department of Computer Science And Engineering > > University of Moratuwa, Sri Lanka >
