This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Testing and the fly likes Is there any Assert statement for checking Greater than or equal to condition? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Is there any Assert statement for checking Greater than or equal to condition?" Watch "Is there any Assert statement for checking Greater than or equal to condition?" New topic
Author

Is there any Assert statement for checking Greater than or equal to condition?

Pooja Patole
Ranch Hand

Joined: Mar 13, 2012
Posts: 35
Hello everyone,
Can anyone tell me if there is an assert in Junit api to check for greater than or equal to condition? I checked the api but did not find any such thing.. I want to check if count1 is greater than or equal to count2.. How should i do that??

Thanks ,
Pooja
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Please do take out time to CarefullyChooseOneForum
You have posted in the GUI forum, which has nothing to do with your question.
This post has been moved to a more appropriate forum


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Pooja Patole
Ranch Hand

Joined: Mar 13, 2012
Posts: 35
Maneesh Godbole wrote:Please do take out time to CarefullyChooseOneForum
You have posted in the GUI forum, which has nothing to do with your question.
This post has been moved to a more appropriate forum


Hello Maneesh. Where do i write this post then?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

You don't need to do anything. I have already moved it to the Testing forum for you
Pooja Patole
Ranch Hand

Joined: Mar 13, 2012
Posts: 35
Maneesh Godbole wrote:You don't need to do anything. I have already moved it to the Testing forum for you


OKay !! Thanks .. So I think I am in the testing forum now ..
dennis deems
Ranch Hand

Joined: Mar 12, 2011
Posts: 808
There isn't a greater-than-or-equal-to assertion. You'll have to write something like this:
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38033
    
  22
I would use the keywordYou would do well to define the invariant for the class and put it into a methodThen at the end of each method which alters any fields, you put an assertionThen you execute the application with the -ea option
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any Assert statement for checking Greater than or equal to condition?
 
Similar Threads
Confusion about assertions
please explain this Assertions problem
How to sort an arraylist?
"assert" keyword?!!!
Question about assert