mike foulk

Greenhorn
+ Follow
since Jul 12, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mike foulk

Need help with JUnit tests.
Can some one show me a few assert test examples, I'm so clueless with these things, like assertEquals, and assertNotNull.(please show me how in a beginner level example)

things I need to test now are: getting things With SQL and storing them into a collection and returning them.
14 years ago
Okay, after make sure that the collection is totally of type number - how do I add them(the collection values) up and store them into a double or a int?

--

So having done this, getting an average of the total should be easy by dividing the total by colection.size() right?
14 years ago

Originally posted by Keith Lynn:


Can you control the content of the Collection? That is, if you only allow numeric content to the be added to the Collection, you won't have to make a check.




How do you only allow numeric content?
14 years ago

Originally posted by Keith Lynn:


Can you control the content of the Collection? That is, if you only allow numeric content to the be added to the Collection, you won't have to make a check.

How do you only allow numeric content?

14 years ago
I have a method that receives a collection in its parameters. Dosen't this mean that it should take an array in the method - method(array)?

an array is a collection, right?

Second question: how do I check a "Collection" for all/100% Number content. (make sure that it has no strings, nulls,

So far I'm using an- statement.

these aren't working so far.
14 years ago