assertEquals(expectedResult,Utils.getNbVersion(productVersion));
}
public void testGetVersionNumber() {
Nbversion nbv = new Nbversion();
nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.0 beta"));
String result = Utils.getBugzillaVersion(nbv);
assertEquals("6.0", result);
nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.0"));
result = Utils.getBugzillaVersion(nbv);
assertEquals(result, "6.0", result);
nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.0.1 RC1"));
result = Utils.getBugzillaVersion(nbv);
assertEquals("6.0.1", result);
nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.5.1"));
result = Utils.getBugzillaVersion(nbv);
assertEquals("6.5", result);
nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.5"));
result = Utils.getBugzillaVersion(nbv);
assertEquals("6.5", result);
nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.7"));
result = Utils.getBugzillaVersion(nbv);
assertEquals("6.7", result);
nbv.setVersion(Utils.getNbVersion("NetBeans IDE Dev"));
result = Utils.getBugzillaVersion(nbv);
assertEquals(Nbversion.DEFAULT_VERSION, result);
}