Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Mocking ListGrid/TreeGrid using Easymock for faster Test

    Hey guys,

    I wanted to mock a TreeGrid using PowerMock/EasyMock:
    Code:
    TreeGrid treeGridMock = PowerMock.createMock(TreeGrid .class);
    but this simple line is generating the following exception:
    Code:
    Caused by: java.lang.ClassFormatError: Invalid method Code length 69051 in class file com/smartgwt/client/widgets/tree/TreeGrid$$EnhancerByCGLIB$$fe8a4b2b
    I read somewhere that JVM cannot support method length more than 64K which I think is the case here but how can I solve this knowing that I cannot change anything inside TreeGrid source code or EasyMock source code?

    PS: Using powermock 1.4.12, I can now mock the ListGrid, but I still have th problem for the TreeGrid
    Last edited by JohnSmith; 25 May 2012, 09:01.

    #2
    Anyone?? Please I really need this!

    I am using SmartGwt 3.0
    and powermock-easymock-junit 1.4.12

    Comment


      #3
      Please did anyone successfully Mock a TreeGrid?

      Comment


        #4
        You can use GwtMockito to create a new ListGrid without error.

        Comment


          #5
          Originally posted by Emilien View Post
          You can use GwtMockito to create a new ListGrid without error.
          How about you provide some working sample code that shows your proof? Please?

          Thanks in advance.

          Comment

          Working...
          X