use of org.ovirt.engine.api.model.Version in project ovirt-engine by oVirt.
the class VersionMapperTest method assertBuild.
/**
* Asserts that the build version number extracted from the given version text is the expected.
*
* @param expected the expected build version number
* @param text the complete version string
*/
private void assertBuild(Integer expected, String text) {
Version version = VersionMapper.fromVersionString(text);
assertNotNull(version);
Integer actual = version.getBuild();
assertEquals("Incorrect build version number", expected, actual);
}
use of org.ovirt.engine.api.model.Version in project ovirt-engine by oVirt.
the class VersionMapperTest method assertMinor.
/**
* Asserts that the minor version number extracted from the given version text is the expected.
*
* @param expected the expected minor version number
* @param text the complete version string
*/
private void assertMinor(Integer expected, String text) {
Version version = VersionMapper.fromVersionString(text);
assertNotNull(version);
Integer actual = version.getMinor();
assertEquals("Incorrect minor version number", expected, actual);
}
use of org.ovirt.engine.api.model.Version in project ovirt-engine by oVirt.
the class VersionMapperTest method testEmptyStringProducesEmptyVersion.
/**
* Checks that an empty version string results in a version object, containing an empty string in the
* {@code full_version} attribute.
*/
@Test
public void testEmptyStringProducesEmptyVersion() {
Version version = VersionMapper.fromVersionString("");
assertNotNull(version);
assertEquals("", version.getFullVersion());
}
use of org.ovirt.engine.api.model.Version in project ovirt-engine by oVirt.
the class VersionMapperTest method assertRevision.
/**
* Asserts that the revision version number extracted from the given version text is the expected.
*
* @param expected the expected revision version number
* @param text the complete version string
*/
private void assertRevision(Integer expected, String text) {
Version version = VersionMapper.fromVersionString(text);
assertNotNull(version);
Integer actual = version.getRevision();
assertEquals("Incorrect revision version number", expected, actual);
}
use of org.ovirt.engine.api.model.Version in project ovirt-engine by oVirt.
the class VersionMapperTest method assertMajor.
/**
* Asserts that the major version number extracted from the given version text is the expected.
*
* @param expected the expected major version number
* @param text the complete version string
*/
private void assertMajor(Integer expected, String text) {
Version version = VersionMapper.fromVersionString(text);
assertNotNull(version);
Integer actual = version.getMajor();
assertEquals("Incorrect major version number", expected, actual);
}
Aggregations