@Test public void testGetProtocol() { RemoteRepository.Builder builder = new RemoteRepository.Builder( "id", "type", "" ); RemoteRepository repo = builder.build(); assertEquals( "", repo.getProtocol() ); repo = builder.setUrl( "http: assertEquals( "http", repo.getProtocol() ); repo = builder.setUrl( "HTTP: assertEquals( "HTTP", repo.getProtocol() ); repo = builder.setUrl( "dav+http: assertEquals( "dav+http", repo.getProtocol() ); repo = builder.setUrl( "dav:http: assertEquals( "dav:http", repo.getProtocol() ); repo = builder.setUrl( "file:/path" ).build(); assertEquals( "file", repo.getProtocol() ); repo = builder.setUrl( "file:path" ).build(); assertEquals( "file", repo.getProtocol() ); repo = builder.setUrl( "file:C:\\dir" ).build(); assertEquals( "file", repo.getProtocol() ); repo = builder.setUrl( "file:C:/dir" ).build(); assertEquals( "file", repo.getProtocol() ); }
public String getProtocol() { return protocol; }
RemoteRepository implements ArtifactRepository { public String getProtocol() { return protocol; } }
RemoteRepository implements ArtifactRepository { public String getProtocol() { return protocol; } RemoteRepository( Builder builder ); }
RemoteRepository implements ArtifactRepository { public String getProtocol() { return protocol; } RemoteRepository( Builder builder ); String getId(); String getContentType(); String getUrl(); String getProtocol(); String getHost(); RepositoryPolicy getPolicy( boolean snapshot ); Proxy getProxy(); Authentication getAuthentication(); List<RemoteRepository> getMirroredRepositories(); boolean isRepositoryManager(); @Override String toString(); @Override boolean equals( Object obj ); @Override int hashCode(); }
RemoteRepository implements ArtifactRepository { public String getProtocol() { return protocol; } RemoteRepository( Builder builder ); String getId(); String getContentType(); String getUrl(); String getProtocol(); String getHost(); RepositoryPolicy getPolicy( boolean snapshot ); Proxy getProxy(); Authentication getAuthentication(); List<RemoteRepository> getMirroredRepositories(); boolean isRepositoryManager(); @Override String toString(); @Override boolean equals( Object obj ); @Override int hashCode();  }