Skip to content

Commit e10d552

Browse files
committed
cleaned up tests
1 parent dfe8c05 commit e10d552

File tree

7 files changed

+69
-67
lines changed

7 files changed

+69
-67
lines changed

test/src/test/java/org/bouncycastle/test/est/TestCACertsFetch.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@
5252

5353

5454
public class TestCACertsFetch
55-
extends SimpleTest
55+
// extends SimpleTest
5656
{
5757

5858
public String getName()
5959
{
6060
return "TestCACertsFetch";
6161
}
6262

63-
public void performTest()
64-
throws Exception
65-
{
66-
ESTTestUtils.runJUnit(TestCACertsFetch.class);
67-
}
63+
// public void performTest()
64+
// throws Exception
65+
// {
66+
// ESTTestUtils.runJUnit(TestCACertsFetch.class);
67+
// }
6868

6969
private ESTServerUtils.ServerInstance startDefaultServer()
7070
throws Exception
@@ -1778,12 +1778,12 @@ public void testCertResponseWithLabelApplication()
17781778
res.getFinished().await(5, TimeUnit.SECONDS);
17791779

17801780
}
1781-
1782-
1783-
public static void main(String[] args)
1784-
throws Exception
1785-
{
1786-
ESTTestUtils.ensureProvider();
1787-
runTest(new TestCACertsFetch());
1788-
}
1781+
//
1782+
//
1783+
// public static void main(String[] args)
1784+
// throws Exception
1785+
// {
1786+
// ESTTestUtils.ensureProvider();
1787+
// runTest(new TestCACertsFetch());
1788+
// }
17891789
}

test/src/test/java/org/bouncycastle/test/est/TestESTServiceFails.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525
* Test illegal state exceptions are thrown when expected.
2626
*/
2727
public class TestESTServiceFails
28-
extends SimpleTest
28+
// extends SimpleTest
2929
{
3030
public String getName()
3131
{
3232
return "ESTServiceFails";
3333
}
3434

35-
public void performTest()
36-
throws Exception
37-
{
38-
ESTTestUtils.runJUnit(TestESTServiceFails.class);
39-
}
35+
// public void performTest()
36+
// throws Exception
37+
// {
38+
// ESTTestUtils.runJUnit(TestESTServiceFails.class);
39+
// }
4040

4141

4242
@Test(expected = NullPointerException.class)

test/src/test/java/org/bouncycastle/test/est/TestEnroll.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,20 @@
5555
import org.junit.Test;
5656

5757
public class TestEnroll
58-
extends SimpleTest
58+
// extends SimpleTest
5959
{
6060

6161
public String getName()
6262
{
6363
return "TestEnroll";
6464
}
6565

66-
public void performTest()
67-
throws Exception
68-
{
69-
ESTTestUtils.runJUnit(TestEnroll.class);
70-
}
66+
67+
// public void performTest()
68+
// throws Exception
69+
// {
70+
// ESTTestUtils.runJUnit(TestEnroll.class);
71+
// }
7172

7273

7374
// Start a server instance that uses basic auth.
@@ -2323,8 +2324,8 @@ public static void main(String[] args)
23232324
// }
23242325
// }
23252326

2326-
ESTTestUtils.ensureProvider();
2327-
runTest(new TestEnroll());
2327+
// ESTTestUtils.ensureProvider();
2328+
// runTest(new TestEnroll());
23282329
}
23292330

23302331
}

test/src/test/java/org/bouncycastle/test/est/TestGetCSRAttrs.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
public class TestGetCSRAttrs
26-
extends SimpleTest
26+
// extends SimpleTest
2727
{
2828

2929
public String getName()
@@ -54,12 +54,11 @@ private ESTServerUtils.ServerInstance startDefaultServer()
5454

5555
}
5656

57-
58-
public void performTest()
59-
throws Exception
60-
{
61-
ESTTestUtils.runJUnit(TestGetCSRAttrs.class);
62-
}
57+
// public void performTest()
58+
// throws Exception
59+
// {
60+
// ESTTestUtils.runJUnit(TestGetCSRAttrs.class);
61+
// }
6362

6463

6564
/**
@@ -750,10 +749,10 @@ public void testFetchCSRWithLabel()
750749
}
751750

752751

753-
public static void main(String[] args)
754-
throws Exception
755-
{
756-
ESTTestUtils.ensureProvider();
757-
runTest(new TestGetCSRAttrs());
758-
}
752+
// public static void main(String[] args)
753+
// throws Exception
754+
// {
755+
// ESTTestUtils.ensureProvider();
756+
// runTest(new TestGetCSRAttrs());
757+
// }
759758
}

test/src/test/java/org/bouncycastle/test/est/TestIllegalPathSegments.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
import org.junit.Test;
99

1010
public class TestIllegalPathSegments
11-
extends SimpleTest
11+
// extends SimpleTest
1212
{
1313
public String getName()
1414
{
1515
return "TestIllegalPathSegments";
1616
}
1717

18-
public void performTest()
19-
throws Exception
20-
{
21-
ESTTestUtils.runJUnit(TestIllegalPathSegments.class);
22-
}
18+
// public void performTest()
19+
// throws Exception
20+
// {
21+
// ESTTestUtils.runJUnit(TestIllegalPathSegments.class);
22+
// }
2323

2424
@Test(expected = IllegalArgumentException.class)
2525
public void testPathSegment_4800()

test/src/test/java/org/bouncycastle/test/est/TestKeyUsage.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
public class TestKeyUsage
31-
extends SimpleTest
31+
// extends SimpleTest
3232
{
3333
private static int[] keyUsage = new int[]{
3434
KeyUsage.digitalSignature,
@@ -75,11 +75,11 @@ public String getName()
7575
return "TestKeyUsage";
7676
}
7777

78-
public void performTest()
79-
throws Exception
80-
{
81-
ESTTestUtils.runJUnit(TestKeyUsage.class);
82-
}
78+
// public void performTest()
79+
// throws Exception
80+
// {
81+
// ESTTestUtils.runJUnit(TestKeyUsage.class);
82+
// }
8383

8484

8585
public static void matrix()

test/src/test/java/org/bouncycastle/test/est/TestServerKeyGeneration.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder;
2222
import org.bouncycastle.util.io.Streams;
2323
import org.bouncycastle.util.test.SimpleTest;
24+
import org.junit.Assert;
2425
import org.junit.Assume;
2526
import org.junit.Before;
2627
import org.junit.Test;
2728

2829
public class TestServerKeyGeneration
29-
extends SimpleTest
30+
// extends SimpleTest
3031
{
3132

3233

@@ -41,11 +42,12 @@ public String getName()
4142
return "test against globalsign est server";
4243
}
4344

44-
public void performTest()
45-
throws Exception
46-
{
47-
testServerGenWithoutEncryption();
48-
}
45+
46+
// public void performTest()
47+
// throws Exception
48+
// {
49+
// testServerGenWithoutEncryption();
50+
// }
4951

5052

5153
@Test
@@ -103,13 +105,13 @@ public void testServerGenWithoutEncryption()
103105
//
104106
if (pki == null)
105107
{
106-
fail("expecting pki");
108+
Assert.fail("expecting pki");
107109
}
108110

109111
X509CertificateHolder enrolledAsHolder = ESTService.storeToArray(enr.getStore())[0];
110112
if (enrolledAsHolder == null)
111113
{
112-
fail("expecting certificate");
114+
Assert.fail("expecting certificate");
113115
}
114116
}
115117
catch (ESTException estException)
@@ -122,11 +124,11 @@ public void testServerGenWithoutEncryption()
122124
}
123125

124126

125-
public static void main(String[] args)
126-
throws Exception
127-
{
128-
ESTTestUtils.ensureProvider();
129-
runTest(new TestServerKeyGeneration());
130-
}
127+
// public static void main(String[] args)
128+
// throws Exception
129+
// {
130+
// ESTTestUtils.ensureProvider();
131+
// runTest(new TestServerKeyGeneration());
132+
// }
131133

132134
}

0 commit comments

Comments
 (0)