-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup, removal of some unneeded resources
- Loading branch information
Showing
6 changed files
with
133 additions
and
16 deletions.
There are no files selected for viewing
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
7 changes: 3 additions & 4 deletions
7
httpconnector/src/test/java/com/redhat/osas/sensor/connector/HttpConnectorTest.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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
package com.redhat.osas.sensor.connector; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
public class HttpConnectorTest { | ||
|
||
public void testHttpConnector() { | ||
public void atestHttpConnector() { | ||
System.out.println("in test"); | ||
Connector connector=new HttpConnector(); | ||
Connector connector = new HttpConnector(); | ||
System.out.println("we have the connector"); | ||
connector.connect("http://192.168.1.115:8080/sensor-web/sensor"); | ||
connector.publish("{\"latitude\":2,\"longitude\":1,\"level\":78,\"timestamp\":12912912}"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
new HttpConnectorTest().testHttpConnector(); | ||
new HttpConnectorTest().atestHttpConnector(); | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
sensor-web/src/test/java/com/redhat/osas/sensor/web/ProviderTest.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,29 @@ | ||
package com.redhat.osas.sensor.web; | ||
|
||
import com.redhat.osas.sensor.web.external.Provider; | ||
import org.jboss.arquillian.container.test.api.Deployment; | ||
import org.jboss.arquillian.junit.Arquillian; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.asset.EmptyAsset; | ||
import org.jboss.shrinkwrap.api.spec.WebArchive; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.fail; | ||
|
||
@RunWith(Arquillian.class) | ||
public class ProviderTest { | ||
@Deployment | ||
public static WebArchive createDeployment() { | ||
WebArchive war = ShrinkWrap.create(WebArchive.class) | ||
.addClass(Provider.class) | ||
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); | ||
System.out.println(war); | ||
return war; | ||
} | ||
|
||
@Test | ||
public void testConfiguration() { | ||
fail("whoa"); | ||
} | ||
} |