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