Author: adietish
Date: 2010-09-30 09:05:45 -0400 (Thu, 30 Sep 2010)
New Revision: 25323
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java
Log:
[JBIDE-7208] added test for RHEL
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java 2010-09-30
12:33:40 UTC (rev 25322)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java 2010-09-30
13:05:45 UTC (rev 25323)
@@ -11,10 +11,8 @@
import static org.junit.Assert.assertEquals;
-import java.io.IOException;
-
import org.jboss.tools.usage.googleanalytics.eclipse.ILinuxDistro;
-import org.jboss.tools.usage.googleanalytics.eclipse.ILinuxDistro.LinuxDistro;
+import org.jboss.tools.usage.test.fakes.LinuxDistroFake;
import org.junit.Test;
public class LinuxDistroTest {
@@ -32,18 +30,10 @@
assertEquals("9.04", distro.getVersion());
}
- public class LinuxDistroFake extends LinuxDistro {
-
- private String releaseFileContent;
-
- public LinuxDistroFake(String name, String releaseFileContent) {
- super(name, "dummy");
- this.releaseFileContent = releaseFileContent;
- }
-
- @Override
- protected String getDistroFileContent(String filePath) throws IOException {
- return releaseFileContent;
- }
+ @Test
+ public void canExtractREDHATVersion() {
+ ILinuxDistro distro = new LinuxDistroFake(ILinuxDistro.REDHAT.getName(),
+ "Red Hat Enterprise Linux Workstation release 6.0 (Santiago)");
+ assertEquals("6.0", distro.getVersion());
}
}
Show replies by date