Cyberduck Mountain Duck CLI

Changeset 11420


Ignore:
Timestamp:
Jun 27, 2013 1:37:20 PM (7 years ago)
Author:
dkocher
Message:

Testability.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/ch/cyberduck/core/NSObjectPathReference.java

    r10082 r11420  
    4343
    4444        @Override
    45         protected <T> PathReference<T> create(AbstractPath param) {
     45        protected <T> PathReference<T> create(Path param) {
    4646            return (PathReference<T>) new NSObjectPathReference(param);
    4747        }
     
    6161
    6262
    63     private NSObjectPathReference(final AbstractPath path) {
     63    protected NSObjectPathReference(final Path path) {
    6464        // Unique name
    6565        final String name = path.unique();
  • trunk/source/ch/cyberduck/core/PathReferenceFactory.java

    r10219 r11420  
    3737    }
    3838
    39     public static <T> PathReference<T> createPathReference(AbstractPath param) {
     39    public static <T> PathReference<T> createPathReference(final Path param) {
    4040        if(!factories.containsKey(NATIVE_PLATFORM)) {
    4141            throw new FactoryException(String.format("No implementation for %s", NATIVE_PLATFORM));
     
    4444    }
    4545
    46     protected abstract <T> PathReference<T> create(AbstractPath param);
     46    protected abstract <T> PathReference<T> create(Path param);
    4747}
  • trunk/test/ch/cyberduck/core/NSObjectPathReferenceTest.java

    r10130 r11420  
    33import ch.cyberduck.ui.cocoa.foundation.NSString;
    44
    5 import org.junit.BeforeClass;
    65import org.junit.Test;
    76
     
    1312 */
    1413public class NSObjectPathReferenceTest extends AbstractTestCase {
    15 
    16     @BeforeClass
    17     public static void register() {
    18         NSObjectPathReference.register();
    19     }
    2014
    2115    @Test
     
    3024    @Test
    3125    public void testEqualConstructors() throws Exception {
    32         assertEquals(new NSObjectPathReference(NSString.stringWithString("/b")), PathReferenceFactory.createPathReference(
     26        assertEquals(new NSObjectPathReference(NSString.stringWithString("/b")), new NSObjectPathReference(
    3327                new NullPath("/b", Path.FILE_TYPE)
    3428        ));
Note: See TracChangeset for help on using the changeset viewer.
swiss made software