1 package org.eclipse.aether.impl.guice;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import static org.junit.Assert.*;
23
24 import java.util.Collections;
25 import java.util.Set;
26
27 import org.eclipse.aether.RepositorySystem;
28 import org.eclipse.aether.impl.ArtifactDescriptorReader;
29 import org.eclipse.aether.impl.MetadataGeneratorFactory;
30 import org.eclipse.aether.impl.StubArtifactDescriptorReader;
31 import org.eclipse.aether.impl.StubVersionRangeResolver;
32 import org.eclipse.aether.impl.StubVersionResolver;
33 import org.eclipse.aether.impl.VersionRangeResolver;
34 import org.eclipse.aether.impl.VersionResolver;
35 import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
36 import org.eclipse.aether.spi.connector.transport.TransporterFactory;
37 import org.junit.Test;
38
39 import com.google.inject.AbstractModule;
40 import com.google.inject.Guice;
41 import com.google.inject.Provides;
42
43 public class AetherModuleTest
44 {
45
46 @Test
47 public void testModuleCompleteness()
48 {
49 assertNotNull( Guice.createInjector( new SystemModule() ).getInstance( RepositorySystem.class ) );
50 }
51
52 static class SystemModule
53 extends AbstractModule
54 {
55
56 @Override
57 protected void configure()
58 {
59 install( new AetherModule() );
60 bind( ArtifactDescriptorReader.class ).to( StubArtifactDescriptorReader.class );
61 bind( VersionRangeResolver.class ).to( StubVersionRangeResolver.class );
62 bind( VersionResolver.class ).to( StubVersionResolver.class );
63 }
64
65 @Provides
66 public Set<MetadataGeneratorFactory> metadataGeneratorFactories()
67 {
68 return Collections.emptySet();
69 }
70
71 @Provides
72 public Set<RepositoryConnectorFactory> repositoryConnectorFactories()
73 {
74 return Collections.emptySet();
75 }
76
77 @Provides
78 public Set<TransporterFactory> transporterFactories()
79 {
80 return Collections.emptySet();
81 }
82
83 }
84
85 }