@Test void equalityTests() { ArchivaNamespace ns1 = ArchivaNamespace.withRepository( repository ).withAsset( asset ).withNamespace( "abc.de/abc" ).build(); ArchivaNamespace ns2 = ArchivaNamespace.withRepository( repository ).withAsset( asset ).withNamespace( "abc.de/abc" ).build(); ArchivaNamespace ns3 = ArchivaNamespace.withRepository( repository ).withAsset( asset ).withNamespace( "abc.de/abcd" ).build(); ArchivaNamespace ns4 = ArchivaNamespace.withRepository( repository ).withAsset( asset ).withNamespace( "abc.de/abc" ). withSeparatorExpression( "/" ).build(); ArchivaNamespace ns5 = ArchivaNamespace.withRepository( new ManagedRepositoryContentMock() ).withAsset( asset ).withNamespace( "abc.de/abc" ).build(); assertFalse( ns1 == ns2 ); assertEquals( ns1, ns2 ); assertNotEquals( ns1, ns3 ); assertEquals( ns1, ns4 ); assertNotEquals( ns1, ns5 ); }
public static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ) { return new Builder( ).withRepository( repository ); }
ArchivaNamespace extends BaseContentItem implements Namespace { public static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ) { return new Builder( ).withRepository( repository ); } }
ArchivaNamespace extends BaseContentItem implements Namespace { public static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ) { return new Builder( ).withRepository( repository ); } private  ArchivaNamespace( ); }
ArchivaNamespace extends BaseContentItem implements Namespace { public static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ) { return new Builder( ).withRepository( repository ); } private  ArchivaNamespace( ); @Override String getId( ); @Override List<String> getNamespacePath( ); static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ); @Override boolean equals( Object o ); @Override int hashCode( ); @Override String toString( ); }
ArchivaNamespace extends BaseContentItem implements Namespace { public static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ) { return new Builder( ).withRepository( repository ); } private  ArchivaNamespace( ); @Override String getId( ); @Override List<String> getNamespacePath( ); static WithAssetBuilder<WithNamespaceBuilder> withRepository( ManagedRepositoryContent repository ); @Override boolean equals( Object o ); @Override int hashCode( ); @Override String toString( );  }