Skip to content

Commit 0475321

Browse files
committed
Move tests.
1 parent 13b7132 commit 0475321

10 files changed

+40
-26
lines changed

binding/pom.xml

+22
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
<artifactId>binding</artifactId>
2525
<packaging>jar</packaging>
2626

27+
<build>
28+
<plugins>
29+
<plugin>
30+
<artifactId>maven-dependency-plugin</artifactId>
31+
</plugin>
32+
</plugins>
33+
</build>
34+
2735
<dependencies>
2836
<dependency>
2937
<groupId>ch.cyberduck</groupId>
@@ -35,5 +43,19 @@
3543
<artifactId>rococoa-core</artifactId>
3644
<version>${rococoa-version}</version>
3745
</dependency>
46+
<dependency>
47+
<groupId>ch.cyberduck</groupId>
48+
<artifactId>test</artifactId>
49+
<type>pom</type>
50+
<scope>test</scope>
51+
<version>${project.version}</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.rococoa</groupId>
55+
<artifactId>librococoa</artifactId>
56+
<version>${rococoa-version}</version>
57+
<type>dylib</type>
58+
<scope>test</scope>
59+
</dependency>
3860
</dependencies>
3961
</project>

osx/src/test/java/ch/cyberduck/binding/foundation/NSDictionaryTest.java renamed to binding/src/test/java/ch/cyberduck/binding/foundation/NSDictionaryTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ch.cyberduck.binding.foundation;
22

33
/*
4-
* Copyright (c) 2002-2021 iterate GmbH. All rights reserved.
4+
* Copyright (c) 2002-2025 iterate GmbH. All rights reserved.
55
* https://cyberduck.io/
66
*
77
* This program is free software; you can redistribute it and/or modify
@@ -18,10 +18,10 @@
1818
import ch.cyberduck.binding.application.NSColor;
1919
import ch.cyberduck.binding.application.NSFont;
2020

21+
import org.junit.Assert;
2122
import org.junit.Test;
2223

2324
import static ch.cyberduck.binding.BundleController.PARAGRAPH_STYLE_LEFT_ALIGNMENT_TRUNCATE_MIDDLE;
24-
import static org.junit.Assert.assertEquals;
2525

2626
public class NSDictionaryTest {
2727

@@ -35,7 +35,7 @@ public void dictionaryWithObjectsForKeys() {
3535
NSAttributedString.ParagraphStyleAttributeName,
3636
NSAttributedString.ForegroundColorAttributeName)
3737
);
38-
assertEquals(3, dict.allKeys().count().intValue());
39-
assertEquals(3, dict.allValues().count().intValue());
38+
Assert.assertEquals(3, dict.allKeys().count().intValue());
39+
Assert.assertEquals(3, dict.allValues().count().intValue());
4040
}
4141
}
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
package ch.cyberduck.binding.foundation;
22

33
/*
4-
* Copyright (c) 2002-2015 David Kocher. All rights reserved.
5-
* http://cyberduck.io/
4+
* Copyright (c) 2002-2025 iterate GmbH. All rights reserved.
5+
* https://cyberduck.io/
66
*
77
* This program is free software; you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by
9-
* the Free Software Foundation; either version 2 of the License, or
9+
* the Free Software Foundation, either version 3 of the License, or
1010
* (at your option) any later version.
1111
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Public License for more details.
16-
*
17-
* Bug fixes, suggestions and comments should be sent to:
18-
1916
*/
2017

18+
import org.junit.Assert;
2119
import org.junit.Test;
2220

23-
import static org.junit.Assert.assertNotNull;
24-
2521
public class NSFileManagerTest {
2622

2723
@Test
2824
public void testContainerURLForSecurityApplicationGroupIdentifier() {
29-
assertNotNull(NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("G69SCX94XU.duck"));
25+
Assert.assertNotNull(NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("G69SCX94XU.duck"));
3026
}
3127
}

osx/src/test/java/ch/cyberduck/binding/foundation/NSNumberTest.java renamed to binding/src/test/java/ch/cyberduck/binding/foundation/NSNumberTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ch.cyberduck.binding.foundation;
22

33
/*
4-
* Copyright (c) 2002-2022 iterate GmbH. All rights reserved.
4+
* Copyright (c) 2002-2025 iterate GmbH. All rights reserved.
55
* https://cyberduck.io/
66
*
77
* This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,7 @@
2020
public class NSNumberTest extends TestCase {
2121

2222
public void testNumberWithBoolean() {
23-
assertTrue(NSNumber.numberWithBoolean(true).boolValue());
24-
assertFalse(NSNumber.numberWithBoolean(false).boolValue());
23+
TestCase.assertTrue(NSNumber.numberWithBoolean(true).boolValue());
24+
TestCase.assertFalse(NSNumber.numberWithBoolean(false).boolValue());
2525
}
2626
}
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
package ch.cyberduck.binding.foundation;
22

33
/*
4-
* Copyright (c) 2002-2015 David Kocher. All rights reserved.
5-
* http://cyberduck.ch/
4+
* Copyright (c) 2002-2025 iterate GmbH. All rights reserved.
5+
* https://cyberduck.io/
66
*
77
* This program is free software; you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by
9-
* the Free Software Foundation; either version 2 of the License, or
9+
* the Free Software Foundation, either version 3 of the License, or
1010
* (at your option) any later version.
1111
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Public License for more details.
16-
*
17-
* Bug fixes, suggestions and comments should be sent to [email protected]
1816
*/
1917

18+
import org.junit.Assert;
2019
import org.junit.Ignore;
2120
import org.junit.Test;
2221
import org.rococoa.cocoa.foundation.NSPoint;
2322

24-
import static org.junit.Assert.assertEquals;
25-
import static org.junit.Assert.assertNotEquals;
26-
2723
public class NSPointTest {
2824

2925
@Test
3026
@Ignore
3127
public void testEquals() {
32-
assertEquals(new NSPoint(0, 0), new NSPoint(0, 0));
28+
Assert.assertEquals(new NSPoint(0, 0), new NSPoint(0, 0));
3329
}
3430

3531
@Test
3632
public void testNotEquals() {
37-
assertNotEquals(new NSPoint(1, 1), new NSPoint(0, 0));
33+
Assert.assertNotEquals(new NSPoint(1, 1), new NSPoint(0, 0));
3834
}
3935
}

0 commit comments

Comments
 (0)