super(name);
}
public void testConstructors() throws Exception
{
PackageRequirement test = new PackageRequirement();
assertNotNull(test.getName());
assertEquals(VersionRange.ALL_VERSIONS, test.getVersionRange());
test = new PackageRequirement("test");
assertEquals("test", test.getName());
assertEquals(VersionRange.ALL_VERSIONS, test.getVersionRange());
VersionRange range = new VersionRange("1.0.0", "2.0.0");
test = new PackageRequirement("test", range);
assertEquals("test", test.getName());
assertEquals(range, test.getVersionRange());
try
{
fail("Should not be here for: " + new PackageRequirement(null));
}
catch (Throwable t)
{
checkDeepThrowable(IllegalArgumentException.class, t);
}
try
{
fail("Should not be here for: " + new PackageRequirement(null, range));
}
catch (Throwable t)
{
checkDeepThrowable(IllegalArgumentException.class, t);
}