I recently added Google Guava as a library to my Eclipse project (I downloaded the 'guava-16.0.jar' from http://code.google.com/p/guava-libraries/ and added it as an external jar library to my Eclipse project).
Eclipse seems to be able to "see"/use the library (I have successfully made imports to packages like com.google.common.collect). Now I want to use the MoreAsserts class in some of my JUnit tests, but when I type in the import:
import com.google.common.testing.MoreAsserts;
Eclipse gives a red flag saying that "The import com.google.common.testing could not be resolved". It doesn't seem to see the package at all.
[EDIT: I think this might be because MoreAsserts is in Beta version (tagged as @Beta), and so I probably shouldn't use it anyway]
Contrary to some of the responses here, com.google.common.testing is available for public use. It's just that it's hidden away in a separate guava-testlib artifact at Maven Central.
That said, you won't find MoreAsserts there. It was removed a few years ago. (The source link you gave points to an old version of Guava. I'm kind of curious where you got the link.)
That said, the reason that MoreAsserts was deleted is that it has been replaced by a more comprehensive equals() and hashCode() tester: EqualsTester. EqualsTester is in the current version of guava-testlib.
It's true that the class is @Beta, but that's probably OK for tests. (And practically speaking, EqualsTester is unlikely to change significantly.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With