Results 1 to 2 of 2
  1. #1
    tcms is offline Member
    Join Date
    May 2013
    Posts
    43
    Rep Power
    0

    Default Question about Assert Message

    Hi guys,

    I'am doing a test on a little program and I decide to make a testclass with Junit. I made an assertNotNull, but this assert receive two parameters (message, condition).

    My question is, what is the porpuse for the message parameter?

    Cheers

  2. #2
    cattox is offline Member
    Join Date
    Mar 2009
    Posts
    8
    Rep Power
    0

    Default Re: Question about Assert Message

    That message will show after a test execution if that specific assertion fails. You can use it to show test variable values to debug possible problems for instance. or just to give some info on the test failure.

Similar Threads

  1. Question Message
    By coollucky in forum AWT / Swing
    Replies: 3
    Last Post: 12-03-2011, 05:50 PM
  2. probleme with assert statement
    By pierre in forum New To Java
    Replies: 3
    Last Post: 10-23-2009, 11:10 PM
  3. Java assert messages lost
    By DavidH in forum Eclipse
    Replies: 0
    Last Post: 08-09-2009, 07:51 PM
  4. Assert with an informative message
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 12:04 AM
  5. Assert - not showing any msg on console
    By ravian in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 04:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •