mirror of
https://github.com/Rogiel/httpchannel
synced 2025-12-06 07:32:50 +00:00
Removes uneeded httpchannel-service-4shared dependency
This commit is contained in:
@@ -12,27 +12,17 @@
|
||||
<name>HttpChannel/Service/4Shared</name>
|
||||
<description>Provides upload access to 4shared.com</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.james</groupId>
|
||||
<artifactId>apache-mime4j</artifactId>
|
||||
<version>0.7.2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
<artifactId>jaxws-api</artifactId>
|
||||
<version>2.2.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>jaxws-rt</artifactId>
|
||||
<version>2.2.7-promoted-b09</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -5,11 +5,14 @@ package org.httpchannel.service.fourshared;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Properties;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.rogiel.httpchannel.service.helper.AuthenticationServices;
|
||||
@@ -21,11 +24,20 @@ import com.rogiel.httpchannel.util.ChannelUtils;
|
||||
*/
|
||||
public class FourSharedServiceTest {
|
||||
private final FourSharedService service = new FourSharedService();
|
||||
private final Properties properties = new Properties();
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
properties.load(Files.newInputStream(Paths
|
||||
.get("../src/test/resources/login.properties")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() throws IOException {
|
||||
AuthenticationServices.authenticator(service, "", "").login();
|
||||
|
||||
AuthenticationServices.authenticator(service,
|
||||
properties.getProperty("4shared.username"),
|
||||
properties.getProperty("4shared.password")).login();
|
||||
|
||||
final Path path = Paths
|
||||
.get("../src/test/resources/upload-test-file.txt");
|
||||
final URI uri = ChannelUtils.upload(service, path);
|
||||
|
||||
1
httpchannel-service/src/test/resources/.gitignore
vendored
Normal file
1
httpchannel-service/src/test/resources/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/login.properties
|
||||
Reference in New Issue
Block a user