Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3CFE0DDBA for ; Mon, 29 Oct 2012 16:51:56 +0000 (UTC) Received: (qmail 44837 invoked by uid 500); 29 Oct 2012 16:51:55 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 44800 invoked by uid 500); 29 Oct 2012 16:51:54 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 44787 invoked by uid 99); 29 Oct 2012 16:51:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 16:51:54 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.149.153] (HELO na3sys009aog125.obsmtp.com) (74.125.149.153) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 16:51:44 +0000 Received: from mail-qa0-f69.google.com ([209.85.216.69]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKUI60Cu9v6fDbcuD2ohHckq+xBBdNW+lw@postini.com; Mon, 29 Oct 2012 09:51:23 PDT Received: by mail-qa0-f69.google.com with SMTP id 2so5060798qam.0 for ; Mon, 29 Oct 2012 09:51:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:mime-version:x-mailer:thread-index:date:message-id:subject:to :content-type:x-gm-message-state; bh=rLHuXAy8BiBWJOAH68BpjHOXi6VLnSE7r0TIlUtjwxA=; b=brjx3Kjmu41X1w3+m2BXWgy6l2Kiyvrm972Kwx/9b0bQ/YPNcDhCZBokPEq6tyCQd4 QEURAbBDEJU/W2czg56TqP5LY1TLPQBH7sxvE9IDowFltEs/tBdkd05ql8c3g99kFY1O q25sKxFhJA+5iWMReZlpmTnBdHZkwQUwmr0OHrMk4cBCegOK5di06fqehpofDYBpD6uP 5R+5mQgUgy37GNdqJx23uBossrudzzsFglDGZJ/vkI3Il3/EQY45ZHjvsuAc6QimZ1X4 IavoI1zSKsJYIXbzxJiC/IuTSMdjys4r/fcKHDJ+7Sj+6jIfPf5mLj7bZkeix0h5Dl5y 208g== Received: by 10.229.178.24 with SMTP id bk24mr1839658qcb.44.1351529481420; Mon, 29 Oct 2012 09:51:21 -0700 (PDT) Received: by 10.229.178.24 with SMTP id bk24mr1839655qcb.44.1351529481314; Mon, 29 Oct 2012 09:51:21 -0700 (PDT) From: Meghna Kale MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac219YG1U2HUcJNlRq+Z+2xAe49JZg== Date: Mon, 29 Oct 2012 22:21:05 +0530 Message-ID: <500347f6872eca60c4bc3e4957422304@mail.gmail.com> Subject: need help for test cases of api/commands To: cloudstack-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=00504502b5f0a3229804cd357ac1 X-Gm-Message-State: ALoCoQk11FRDeRQ9pN5nWDD/AK+XaZNggOKZOlaasq2PBTxrNgZpHT+6Nb0RH3tgaiVFt0PsUVevrI9gSwXEaa+5N/52WqSVCaOH0HEjjhiHrDxigpCgJPqKosmP8QEWjWuAayxOGUBRUbY3aGL9gjqtG3n0eWL7/AhWSM2xXkQMz5DxRtbJ8v2OaIb026gkHNVJc2K2p2Ky X-Virus-Checked: Checked by ClamAV on apache.org --00504502b5f0a3229804cd357ac1 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 DAO I was thinking of returning the object from the service layer. But as the return value of the DAO is an interface in the service layer I= =92m not able to mock the object and pass it on to the API layer. Is any other way or I will have to mock the DAO layer also ? - Meghna. --00504502b5f0a3229804cd357ac1--