use of aQute.bnd.version.MavenVersion in project bnd by bndtools.
the class MavenVersionTest method testNull.
public void testNull() {
MavenVersion mv = MavenVersion.parseString(null);
assertEquals(new Version(0, 0, 0), mv.getOSGiVersion());
assertFalse(mv.isSnapshot());
}
use of aQute.bnd.version.MavenVersion in project bnd by bndtools.
the class MavenVersionTest method testEmptyString.
public void testEmptyString() {
MavenVersion mv = MavenVersion.parseString("");
assertEquals(new Version(0, 0, 0), mv.getOSGiVersion());
assertFalse(mv.isSnapshot());
mv = MavenVersion.parseString(" ");
assertEquals(new Version(0, 0, 0), mv.getOSGiVersion());
assertFalse(mv.isSnapshot());
}
use of aQute.bnd.version.MavenVersion in project bnd by bndtools.
the class MavenVersionTest method testQualifierWithDotSeparator.
public void testQualifierWithDotSeparator() {
MavenVersion mv = MavenVersion.parseString("1.2.3.beta-1");
assertEquals(new Version(1, 2, 3, "beta-1"), mv.getOSGiVersion());
assertFalse(mv.isSnapshot());
mv = MavenVersion.parseString("1.2.beta-1");
assertEquals(new Version(1, 2, 0, "beta-1"), mv.getOSGiVersion());
assertFalse(mv.isSnapshot());
mv = MavenVersion.parseString("1.beta-1");
assertEquals(new Version(1, 0, 0, "beta-1"), mv.getOSGiVersion());
assertFalse(mv.isSnapshot());
}
use of aQute.bnd.version.MavenVersion in project bnd by bndtools.
the class MavenVersionTest method testMajor.
public void testMajor() {
MavenVersion mv = MavenVersion.parseString("1");
assertEquals(new Version(1), mv.getOSGiVersion());
}
use of aQute.bnd.version.MavenVersion in project bnd by bndtools.
the class MavenVersionTest method testMajorMinorMicro.
public void testMajorMinorMicro() {
MavenVersion mv = MavenVersion.parseString("1.2.3");
assertEquals(new Version(1, 2, 3), mv.getOSGiVersion());
}
Aggregations