Skip to Content
author's profile photo
Former Member

JUNIT and DCs

I would like to test my classes of my Development components with JUnit. Unfortunately I cant import the junit.jar in my DC project. So is there any other possibility to use JUnit with DCs?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Jul 06, 2004 at 10:56 AM

    > I would like to test my classes of my Development

    > components with JUnit. Unfortunately I cant import

    > the junit.jar in my DC project.

    I have the same question. Although I can manage to add a junit jar file on the Java perspective, "Package Explorer" view and use "organize imports" as expected, when building the DC (on view "Java DC explorer") the compiler cannot find the required lib I just added.

    Am I stupid or is the program?

    Regards

    Klaus

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      As far as I know it is not possible to use external jars in DCs. At least at the moment. I think SAP is planning this for the future.

      I will try to import the java source code of junit to see if this works.

  • author's profile photo
    Former Member
    Jul 23, 2004 at 11:52 PM

    We were able to import external jars by doing the following.

    Create a new java DC project.

    Expand all the contents of the jar file (winzip) into a folder.

    In DC MetaData, set add this folder to packages.

    Create a public part.

    Select 'Folder Tree' and bind it to the folder that was expanded.

    This essentially recreates the jar file for use. Reference it with your other DCs. In the case of the jUnit jar, set it to be a compilation only public part ( not assembly ) and it won't get packaged.

    Add comment
    10|10000 characters needed characters exceeded