This repository has been archived by the owner on Mar 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from junkerm/develop
v0.2.1
- Loading branch information
Showing
124 changed files
with
22,619 additions
and
22,221 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
209e668de72134c5cf18b21341c136d64a15e45fe72c529d30c456840db44b43 | ||
b2dbf9ecd6b0a4eebe8816f45c59ad40a98f682eeae6e5a2b2f3ded32841ff5c |
Binary file added
BIN
+40.8 KB
...es/cnf/localrepo/net.bytebuddy.byte-buddy-agent/net.bytebuddy.byte-buddy-agent-1.8.13.jar
Binary file not shown.
Binary file added
BIN
+2.84 MB
bundles/cnf/localrepo/net.bytebuddy.byte-buddy/net.bytebuddy.byte-buddy-1.8.13.jar
Binary file not shown.
Binary file added
BIN
+543 KB
bundles/cnf/localrepo/org.mockito.mockito-core/org.mockito.mockito-core-2.19.1.jar
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<repository xmlns="http://www.osgi.org/xmlns/repository/v1.0.0" name="Release" increment="1531494541751"/> | ||
<repository xmlns="http://www.osgi.org/xmlns/repository/v1.0.0" name="Release" increment="1531654341662"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ade5eb958cf0e91aea6531a30eaf9d0933ce086c260ef2338d1d6a06f6d592dd | ||
ac2a878e71e3964eac062550754c59507b3b86b848724548581b68e9493f6c0a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Private-Package: com.specmate.config.internal | ||
Private-Package: com.specmate.config.internal | ||
-buildpath: \ | ||
org.eclipse.osgi.services,\ | ||
specmate-common;version=latest,\ | ||
org.apache.commons.lang3,\ | ||
osgi.core,\ | ||
specmate-config-api;version=latest | ||
specmate-config-api;version=latest | ||
Include-Resource: config=config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/bin/ | ||
/generated/ | ||
/bin/ | ||
/generated/ | ||
/test_bin/ | ||
/bin_test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
bundles/specmate-connectors/test/com/specmate/connectors/test/ConnectorServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.specmate.connectors.test; | ||
|
||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.verifyZeroInteractions; | ||
import static org.mockito.Mockito.when; | ||
|
||
import java.io.IOException; | ||
import java.util.Dictionary; | ||
|
||
import org.junit.Test; | ||
import org.mockito.Mockito; | ||
import org.osgi.service.cm.Configuration; | ||
import org.osgi.service.cm.ConfigurationAdmin; | ||
import org.osgi.service.log.LogService; | ||
|
||
import com.specmate.common.SpecmateException; | ||
import com.specmate.common.SpecmateValidationException; | ||
import com.specmate.config.api.IConfigService; | ||
import com.specmate.connectors.internal.config.ConnectorServiceConfig; | ||
|
||
public class ConnectorServiceTest { | ||
|
||
@Test | ||
public void testConnectorServiceDisabling() | ||
throws SpecmateException, SpecmateValidationException, InterruptedException { | ||
ConnectorServiceConfig connectorConfig = new ConnectorServiceConfig(); | ||
connectorConfig.setLogService(mock(LogService.class)); | ||
|
||
IConfigService configServiceMock = mock(IConfigService.class); | ||
when(configServiceMock.getConfigurationProperty(ConnectorServiceConfig.KEY_POLL_TIME, "20")).thenReturn("-1"); | ||
connectorConfig.setConfigurationService(configServiceMock); | ||
|
||
ConfigurationAdmin configAdminMock = mock(ConfigurationAdmin.class); | ||
connectorConfig.setConfigurationAdmin(configAdminMock); | ||
|
||
connectorConfig.configureConnectorService(); | ||
|
||
verifyZeroInteractions(configAdminMock); | ||
} | ||
|
||
@Test | ||
public void testConnectorServiceEnabling() | ||
throws SpecmateException, SpecmateValidationException, InterruptedException, IOException { | ||
ConnectorServiceConfig connectorConfig = new ConnectorServiceConfig(); | ||
connectorConfig.setLogService(mock(LogService.class)); | ||
|
||
IConfigService configServiceMock = mock(IConfigService.class); | ||
when(configServiceMock.getConfigurationProperty(ConnectorServiceConfig.KEY_POLL_TIME, "20")).thenReturn("20"); | ||
connectorConfig.setConfigurationService(configServiceMock); | ||
|
||
ConfigurationAdmin configAdminMock = mock(ConfigurationAdmin.class); | ||
Configuration configurationMock = mock(Configuration.class); | ||
when(configAdminMock.getConfiguration(Mockito.any(String.class))).thenReturn(configurationMock); | ||
connectorConfig.setConfigurationAdmin(configAdminMock); | ||
|
||
connectorConfig.configureConnectorService(); | ||
|
||
verify(configurationMock, Mockito.atLeastOnce()).update(Mockito.any(Dictionary.class)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.