<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to unit test an operation ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-unit-test-an-operation/m-p/320000#M7001</link>
    <description>&lt;P&gt;I have created a few custom operations and I need to unit test them.&lt;/P&gt;
&lt;P&gt;I have seen some Java classes using the main method to call operations on a already running nuxeo instance.&lt;/P&gt;
&lt;P&gt;My question is how can I create a unit test that would run the operation in a virtual nuxeo server ?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2012 09:31:28 GMT</pubDate>
    <dc:creator>fast_narcis_</dc:creator>
    <dc:date>2012-02-13T09:31:28Z</dc:date>
    <item>
      <title>How to unit test an operation ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-unit-test-an-operation/m-p/320000#M7001</link>
      <description>&lt;P&gt;I have created a few custom operations and I need to unit test them.&lt;/P&gt;
&lt;P&gt;I have seen some Java classes using the main method to call operations on a already running nuxeo instance.&lt;/P&gt;
&lt;P&gt;My question is how can I create a unit test that would run the operation in a virtual nuxeo server ?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2012 09:31:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-unit-test-an-operation/m-p/320000#M7001</guid>
      <dc:creator>fast_narcis_</dc:creator>
      <dc:date>2012-02-13T09:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to unit test an operation ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-unit-test-an-operation/m-p/320001#M7002</link>
      <description>&lt;P&gt;Thanks to the open source way, you can look into our source code.&lt;/P&gt;
&lt;P&gt;Location of default Nuxeo Core Operations are located &lt;A href="https://github.com/nuxeo/nuxeo-features/tree/master/nuxeo-automation/nuxeo-automation-features"&gt;here&lt;/A&gt;.
And if you look into the unit test part you have some JUnit4 Tests.
You have examples of Unit test that init the Core Repository, directories, relation service, ...&lt;/P&gt;
&lt;P&gt;If your operation need a Seam context or is dedicated for JSF you can learn from test &lt;A href="https://github.com/nuxeo/nuxeo-features/tree/master/nuxeo-automation/nuxeo-automation-jsf"&gt;in this bundle&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To clone these sources on your desktop:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;install &lt;A href="http://doc.nuxeo.com/x/cYeN"&gt;git on your desktop&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;git clone git@github.com:nuxeo/nuxeo-features.git&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope this will help you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2012 10:03:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-unit-test-an-operation/m-p/320001#M7002</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-13T10:03:27Z</dc:date>
    </item>
  </channel>
</rss>

