PicoContainer
  1. PicoContainer
  2. PICO-164

update JMock usage in Pico/Nano to JMock-1.0.0.RC1

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC-1
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven running testcases using JMock
    • Number of attachments :
      1

      Description

      As requested on the Picocontainer dev list, I have updated all of the Pico/Nano tests to use the syntax of the very latest JMock API. I will be attaching a zip file containing the JMock jar used to build/test against named "jmock-20040401.jar" along with a patch against all testcases using JMock and all project.xml files specifying the JMock version being used.

      Attachment coming up!

      Jake

      1. patch1.diff
        10 kB
        Aslak Hellesøy

        Issue Links

          Activity

          Hide
          Jacob Kjome added a comment -

          zip file containing patch against latest pico/nano CVS which updates tests to use latest API of JMock. Also included is a copy of the JMock jar tested against called "jmock-20040401.jar".

          Jake

          Show
          Jacob Kjome added a comment - zip file containing patch against latest pico/nano CVS which updates tests to use latest API of JMock. Also included is a copy of the JMock jar tested against called "jmock-20040401.jar". Jake
          Jacob Kjome made changes -
          Field Original Value New Value
          Attachment pico_nano-jmock_patch.zip [ 11762 ]
          Hide
          Konstantin Pribluda added a comment -

          Also, there is even a patch. And AFAIK, nanocontainer is deprecated
          (as JIRA project)

          Show
          Konstantin Pribluda added a comment - Also, there is even a patch. And AFAIK, nanocontainer is deprecated (as JIRA project)
          Konstantin Pribluda made changes -
          Link This issue is duplicated by NANO-66 [ NANO-66 ]
          Hide
          Aslak Hellesøy added a comment -

          The NANO JIRA project is not deprecated.

          Show
          Aslak Hellesøy added a comment - The NANO JIRA project is not deprecated.
          Hide
          Aslak Hellesøy added a comment -

          This can't be applied until JMOCK-13 is resolved.

          Show
          Aslak Hellesøy added a comment - This can't be applied until JMOCK-13 is resolved.
          Aslak Hellesøy made changes -
          Link This issue depends upon JMOCK-13 [ JMOCK-13 ]
          Hide
          Jacob Kjome added a comment -

          Note that the attached zip file, which includes the patch, also includes the JMock jar file that I tested against. Obviously it would be good to have an official one, though. In that case, however, make sure to remove the patch references to the project.xml files before applying this patch since I change those to point to the named version of the JMock jar I included.

          Jake

          Show
          Jacob Kjome added a comment - Note that the attached zip file, which includes the patch, also includes the JMock jar file that I tested against. Obviously it would be good to have an official one, though. In that case, however, make sure to remove the patch references to the project.xml files before applying this patch since I change those to point to the named version of the JMock jar I included. Jake
          Hide
          Jacob Kjome added a comment -

          Updated to lastest JMock jar from from 20040408 CVS. Also fixed a problem with the last patch. I had commented out all the mock.verify() calls because JMock now verifies things automatically, except in order for that to happen, Mock objects have to be created using the mock() method of the MockObjectTestCase class. That is now done and tests continue to pass.

          Jake

          Show
          Jacob Kjome added a comment - Updated to lastest JMock jar from from 20040408 CVS. Also fixed a problem with the last patch. I had commented out all the mock.verify() calls because JMock now verifies things automatically, except in order for that to happen, Mock objects have to be created using the mock() method of the MockObjectTestCase class. That is now done and tests continue to pass. Jake
          Jacob Kjome made changes -
          Attachment pico_nano-jmock_patch_20040408.zip [ 11834 ]
          Hide
          Jacob Kjome added a comment -

          Here's a patch that applies slightly cleaner. Also modified a couple things in a very small way, also done to make things a bit cleaner. Still works against the jmock-20040408.jar in the most recent zip file attachment.

          Jake

          Show
          Jacob Kjome added a comment - Here's a patch that applies slightly cleaner. Also modified a couple things in a very small way, also done to make things a bit cleaner. Still works against the jmock-20040408.jar in the most recent zip file attachment. Jake
          Jacob Kjome made changes -
          Attachment pico_nano-jmock_20040409.patch [ 11844 ]
          Hide
          Jacob Kjome added a comment -

          Yet another patch to keep up with changes to Picocontainer/Nanocontainer CVS mods. Also updates to latest JMock CVS + not-yet-applied patch for a simple (but bad) JMock regression...
          http://jira.codehaus.org/secure/ViewIssue.jspa?key=JMOCK-19

          Can this please get applied sometime soon? It all tests out ok and it is kind of difficult to keep up with new changes.

          Jake

          Show
          Jacob Kjome added a comment - Yet another patch to keep up with changes to Picocontainer/Nanocontainer CVS mods. Also updates to latest JMock CVS + not-yet-applied patch for a simple (but bad) JMock regression... http://jira.codehaus.org/secure/ViewIssue.jspa?key=JMOCK-19 Can this please get applied sometime soon? It all tests out ok and it is kind of difficult to keep up with new changes. Jake
          Jacob Kjome made changes -
          Attachment pico_nano-jmock_patch_20040415.zip [ 11903 ]
          Hide
          Aslak Hellesøy added a comment -

          According to Nat in JMOCK-13, there is still an upcoming major change in the JMock API before it is released.

          I saw him on Wednesday, and he said JMock would probably be released in a week or two. Probably that is.

          So we'd prefer waiting with your patches until the JMock API has stabilised and a jar has been uploaded to http://dist.codehaus.org/jmock/jars/

          Cheers,
          Aslak

          Show
          Aslak Hellesøy added a comment - According to Nat in JMOCK-13, there is still an upcoming major change in the JMock API before it is released. I saw him on Wednesday, and he said JMock would probably be released in a week or two. Probably that is. So we'd prefer waiting with your patches until the JMock API has stabilised and a jar has been uploaded to http://dist.codehaus.org/jmock/jars/ Cheers, Aslak
          Hide
          Jacob Kjome added a comment -

          update to jmock stuff to match up with latest pico/nano cvs as of today.

          JMock's new build.xml has the version number for JMock at 1.0-RC1, so, that's what I reference in the project.xml files for the JMock version.

          Jake

          Show
          Jacob Kjome added a comment - update to jmock stuff to match up with latest pico/nano cvs as of today. JMock's new build.xml has the version number for JMock at 1.0-RC1, so, that's what I reference in the project.xml files for the JMock version. Jake
          Jacob Kjome made changes -
          Attachment pico_nano-jmock-1.0-RC1.patch [ 12112 ]
          Aslak Hellesøy made changes -
          Assignee Aslak Hellesoy [ rinkrank ]
          Fix Version/s 1.0 [ 10423 ]
          Summary update JMock usage in Pico/Nano to 20040401 snapshot update JMock usage in Pico/Nano to JMock-1.0.0.RC1
          Hide
          Aslak Hellesøy added a comment -

          Applied finally. JMock 1.0.0.RC1 was released today

          Thanks Jake!

          Show
          Aslak Hellesøy added a comment - Applied finally. JMock 1.0.0.RC1 was released today Thanks Jake!
          Aslak Hellesøy made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Aslak Hellesøy added a comment -

          More patches from Jacob

          Show
          Aslak Hellesøy added a comment - More patches from Jacob
          Aslak Hellesøy made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Aslak Hellesøy made changes -
          Attachment pico_nano-jmock-1.0-RC1.patch [ 12112 ]
          Aslak Hellesøy made changes -
          Attachment pico_nano-jmock_20040409.patch [ 11844 ]
          Aslak Hellesøy made changes -
          Attachment pico_nano-jmock_patch.zip [ 11762 ]
          Aslak Hellesøy made changes -
          Attachment pico_nano-jmock_patch_20040408.zip [ 11834 ]
          Aslak Hellesøy made changes -
          Attachment pico_nano-jmock_patch_20040415.zip [ 11903 ]
          Hide
          Aslak Hellesøy added a comment -

          New patch from Jacob

          Show
          Aslak Hellesøy added a comment - New patch from Jacob
          Aslak Hellesøy made changes -
          Attachment patch1.diff [ 12175 ]
          Hide
          Aslak Hellesøy added a comment -

          Hi Aslak,

          Sorry to email you directly, but this one is pretty minor, I can't attach files to a close bug, and I thought this would just be noise on the list. I meant to provide this in an updated patch, but found out you already used the last patch I provided (thanks, BTW!).

          The patch provides some minor cleanup of the commented out mock.verify() methods that aren't needed anymore. It also patches a couple project.xml files fixing a couple misspellings of nanocontainer as "nancontainer" in the main project.xml and adds <groupId>nanocontainer</groupId> to the type1 project.xml.

          BTW, there are spots where using stubs or expects(atLeastOnce()) would be more flexible. I decided not to do this on my own because I didn't want to accidentally change the behavior of the existing tests, so I just mirrored the old code with the new syntax. I'll leave it to you and others who know the tests better to make any desired changes utilizing new JMock features.

          later,

          Jake

          Show
          Aslak Hellesøy added a comment - Hi Aslak, Sorry to email you directly, but this one is pretty minor, I can't attach files to a close bug, and I thought this would just be noise on the list. I meant to provide this in an updated patch, but found out you already used the last patch I provided (thanks, BTW!). The patch provides some minor cleanup of the commented out mock.verify() methods that aren't needed anymore. It also patches a couple project.xml files fixing a couple misspellings of nanocontainer as "nancontainer" in the main project.xml and adds <groupId>nanocontainer</groupId> to the type1 project.xml. BTW, there are spots where using stubs or expects(atLeastOnce()) would be more flexible. I decided not to do this on my own because I didn't want to accidentally change the behavior of the existing tests, so I just mirrored the old code with the new syntax. I'll leave it to you and others who know the tests better to make any desired changes utilizing new JMock features. later, Jake
          Hide
          Aslak Hellesøy added a comment -

          applied again. thanks!

          Show
          Aslak Hellesøy added a comment - applied again. thanks!
          Aslak Hellesøy made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Aslak Hellesøy
              Reporter:
              Jacob Kjome
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: