Re: need help for test cases of api/commands

2012-10-31 Thread Chiradeep Vittal
); > > } >} > >- Meghna. > > > >-Original Message- >From: Chiradeep Vittal [mailto:chiradeep.vit...@citrix.com] >Sent: Wednesday, October 31, 2012 12:50 AM >To: Meghna Kale; Alex Huang >Cc: CloudStack DeveloperList >Subject: Re: need help for test cases of api/commands > > > >On 10/30/12 12:12 PM, "Meghna Kale" wrote: > >>_projectService = >>ComponentLocator.inject(MockProjectServiceImpl.class); > >When you do this, the _projectService is no longer a Mockito object.

RE: need help for test cases of api/commands

2012-10-31 Thread Meghna Kale
Assert.assertEquals(2L, activateProjectCmd.getEntityOwnerId()); } } - Meghna. -Original Message- From: Chiradeep Vittal [mailto:chiradeep.vit...@citrix.com] Sent: Wednesday, October 31, 2012 12:50 AM To: Meghna Kale; Alex Huang Cc: CloudStack DeveloperList Subject: Re: need help

RE: need help for test cases of api/commands

2012-10-30 Thread Meghna Kale
, October 31, 2012 12:50 AM To: Meghna Kale; Alex Huang Cc: CloudStack DeveloperList Subject: Re: need help for test cases of api/commands On 10/30/12 12:12 PM, "Meghna Kale" wrote: >_projectService = >ComponentLocator.inject(MockProjectServiceImpl.class); When you do this, the _proj

Re: need help for test cases of api/commands

2012-10-30 Thread Chiradeep Vittal
On 10/30/12 12:12 PM, "Meghna Kale" wrote: >_projectService = >ComponentLocator.inject(MockProjectServiceImpl.class); When you do this, the _projectService is no longer a Mockito object.

RE: need help for test cases of api/commands

2012-10-30 Thread Meghna Kale
Tuesday, October 30, 2012 11:30 PM To: Alex Huang; Meghna Kale Cc: CloudStack DeveloperList Subject: Re: need help for test cases of api/commands I think Meghna's problem is that she has to mock the Project interface since the DAO returns Project instead of a concrete class ProjectVO. If we use

Re: need help for test cases of api/commands

2012-10-30 Thread Chiradeep Vittal
s.xml. > >cloud-stack-components-specification=[path to your own components.xml] > >Let me know if you have any questions. > > >--Alex > >> -Original Message- >> From: Meghna Kale [mailto:meghna.k...@sungard.com] >> Sent: Monday, October 29, 2012

RE: need help for test cases of api/commands

2012-10-29 Thread Alex Huang
age- > From: Meghna Kale [mailto:meghna.k...@sungard.com] > Sent: Monday, October 29, 2012 12:23 PM > To: Chiradeep Vittal > Cc: cloudstack-dev@incubator.apache.org; Alex Huang > Subject: RE: need help for test cases of api/commands > > I was trying with mocks. > &

RE: need help for test cases of api/commands

2012-10-29 Thread Meghna Kale
I was trying with mocks. -Original Message- From: Chiradeep Vittal [mailto:chiradeep.vit...@citrix.com] Sent: Tuesday, October 30, 2012 12:04 AM To: CloudStack DeveloperList; Alex Huang Subject: Re: need help for test cases of api/commands Are you writing mocks, or are you planning to

Re: need help for test cases of api/commands

2012-10-29 Thread Chiradeep Vittal
*null*; > > } > >.. > > > >} > > > >-- - Meghna. > > > > >On Mon, Oct 29, 2012 at 11:42 PM, Alex Huang >wrote: > >> Meghna, >> >> Can you give an example of which call you're talking about and point out >

Re: need help for test cases of api/commands

2012-10-29 Thread Meghna Kale
ghna.k...@sungard.com] > > Sent: Monday, October 29, 2012 9:51 AM > > To: cloudstack-dev@incubator.apache.org > > Subject: need help for test cases of api/commands > > > > Hi All, > > > > > > > > I was writing some test cases for the API layer &g

RE: need help for test cases of api/commands

2012-10-29 Thread Alex Huang
gt; To: cloudstack-dev@incubator.apache.org > Subject: need help for test cases of api/commands > > Hi All, > > > > I was writing some test cases for the API layer > api\src\com\cloud\api\commands. > > I facing some issue can someone help me. > > > >

need help for test cases of api/commands

2012-10-29 Thread Meghna Kale
Hi All, I was writing some test cases for the API layer api\src\com\cloud\api\commands. I facing some issue can someone help me. There are some service layer calls in the classes , I tried to mock the service layer. The Service layer internally calls the DAO, rather than calling the mock DA