Menu

Use xmlunit without extending XMLTestcase

jm
2002-09-06
2002-09-09
  • jm

    jm - 2002-09-06

    Hi,

    Nice project.
    We have started testing our web-app recently. Currently we use another junit based project (StrutsTestcase) that allows us to test our struts code as it is running in a web container.
    That forces us to extend a class:
    public class Test1Action extends MockStrutsTestCase...

    The result of the Action is given as a xml doc, so it would be very nice to use xmlunit to assert results.

    So, as the subject says, my question is: Is it possible to use xmlunit wihtout actully extending XMLTestcase?

    thanks,

     
    • Jeff Martin

      Jeff Martin - 2002-09-06

      You should be able to call
      assertTrue(XMLUnit.compare(doc1, doc2).identical())

       
    • jm

      jm - 2002-09-09

      My first trials worked fine, thanks.

       

Log in to post a comment.

MongoDB Logo MongoDB