Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 359024: Fix tests by making some class public (OSGi compliance)

  • Loading branch information...
commit 3518772ec2770773da25f5856e6d1d9dbb656f29 1 parent 9262d02
@mickaelistria mickaelistria authored
View
8 .project
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>swtbot</name>
+ <comment/>
+ <projects/>
+ <buildSpec/>
+ <natures/>
+</projectDescription>
View
2  ...wtbot.swt.finder.test/src/org/eclipse/swtbot/swt/finder/keyboard/KeyboardFactoryTest.java
@@ -34,7 +34,7 @@ public void createsKeyboardForSWTKeyboardStrategy() throws Exception {
@Test
public void createsKeyboardForMockKeyboardStrategy() throws Exception {
- assertEquals(MockKeyboardStrategy.class, new KeyboardFactory(MockKeyboardStrategy.class.getName()).strategyClass);
+ assertEquals(MockKeyboardStrategy.class, new KeyboardFactory(MockKeyboardStrategy.class).strategyClass);
}
@Override
View
2  ...pse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/AWTKeyboardStrategy.java
@@ -25,7 +25,7 @@
* @author Ketan Padegaonkar &lt;KetanPadegaonkar [at] gmail [dot] com&gt;
* @version $Id$
*/
-class AWTKeyboardStrategy extends AbstractKeyboardStrategy {
+public class AWTKeyboardStrategy extends AbstractKeyboardStrategy {
private final Robot robot;
View
3  ...eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/KeyboardFactory.java
@@ -26,12 +26,13 @@
*/
public class KeyboardFactory {
- final Class<?> strategyClass;
+ public final Class<?> strategyClass;
/**
* @param strategyClass the name of the class that is an instance of {@link KeyboardStrategy}.
* @throws Exception if the class cannot be instantiated.
*/
+ @Deprecated
public KeyboardFactory(String strategyClass) throws Exception {
this(Class.forName(strategyClass));
}
View
2  org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/KeyboardLayout.java
@@ -28,7 +28,7 @@
* @author Ketan Padegaonkar &lt;KetanPadegaonkar [at] gmail [dot] com&gt;
* @version $Id$
*/
-class KeyboardLayout {
+public class KeyboardLayout {
private final BidiMap<Character, KeyStroke> keyStrokes = new BidiMap<Character, KeyStroke>();
private final String layoutName;
View
2  org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/Keystrokes.java
@@ -113,7 +113,7 @@
* @param ch the character to convert to {@link KeyStroke}s.
* @return the {@link KeyStroke}s corresponding to the character.
*/
- static KeyStroke[] create(char ch) {
+ public static KeyStroke[] create(char ch) {
KeyStroke keyStroke = defaultKeyboardLayout.keyStrokeFor(ch);
if (keyStroke.getModifierKeys() == KeyStroke.NO_KEY)
return new KeyStroke[] { keyStroke };
View
2  ...se.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/MockKeyboardStrategy.java
@@ -26,7 +26,7 @@
* @author Ketan Padegaonkar &lt;KetanPadegaonkar [at] gmail [dot] com&gt;
* @version $Id$
*/
-class MockKeyboardStrategy extends AbstractKeyboardStrategy {
+public class MockKeyboardStrategy extends AbstractKeyboardStrategy {
private MyWidget widget;
View
2  ...pse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/SWTKeyboardStrategy.java
@@ -29,7 +29,7 @@
* @version $Id$
* @see Display#KeyTable
*/
-class SWTKeyboardStrategy extends AbstractKeyboardStrategy {
+public class SWTKeyboardStrategy extends AbstractKeyboardStrategy {
private final Display display;
View
63 pom.xml
@@ -18,6 +18,10 @@
</prerequisites>
<properties>
<tycho-version>0.15.0</tycho-version>
+ <!-- Properties to enable jacoco code coverage analysis -->
+ <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+ <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
+ <sonar.jacoco.itReportPath>../target/jacoco.exec</sonar.jacoco.itReportPath>
</properties>
<modules>
@@ -140,47 +144,32 @@
</environments>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.5.8.201207111220</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <!-- Where to put jacoco coverage report -->
+ <destFile>${sonar.jacoco.itReportPath}</destFile>
+ <includes>
+ <include>org.eclipse.swtbot.*</include>
+ </includes>
+ <append>true</append>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
<profile>
- <id>jacoco</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <!-- Properties to enable jacoco code coverage analysis -->
- <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
- <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
- <sonar.jacoco.itReportPath>../target/jacoco.exec</sonar.jacoco.itReportPath>
- </properties>
- <build>
- <plugins>
- <!-- Enabling use of jacoco -->
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.5.3.201107060350</version>
- <executions>
- <execution>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <!-- Where to put jacoco coverage report -->
- <destFile>${sonar.jacoco.itReportPath}</destFile>
- <includes>*.swtbot.*</includes>
- <append>true</append>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>helios</id>
<activation>
<activeByDefault>false</activeByDefault>
@@ -256,4 +245,4 @@
</profile>
</profiles>
-</project>
+</project>

0 comments on commit 3518772

Please sign in to comment.
Something went wrong with that request. Please try again.