summaryrefslogtreecommitdiff
path: root/smcc/src/test/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'smcc/src/test/java/at')
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/CardEmul.java2
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java12
2 files changed, 5 insertions, 9 deletions
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/CardEmul.java b/smcc/src/test/java/at/gv/egiz/smcc/CardEmul.java
index ac964471..5d78871e 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/CardEmul.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/CardEmul.java
@@ -86,7 +86,7 @@ public class CardEmul extends Card {
if (exclThread == Thread.currentThread()) {
exclThread = null;
} else if (exclThread == null) {
- throw new CardException("Exclusive access has not been assigned.");
+ throw new IllegalStateException("Exclusive access has not been assigned.");
} else {
throw new CardException(
"Exclusive access has not been assigned to current thread.");
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java
index 28ad9090..f6faafe6 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java
@@ -168,7 +168,7 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
}
- @Test(expected = CancelledException.class)
+ @Test
public void testSignSIGConcurrent() throws SignatureCardException,
InterruptedException, CardNotSupportedException,
NoSuchAlgorithmException, IOException {
@@ -180,10 +180,8 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
try {
signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
- assertTrue(false);
- return null;
+ return "123456".toCharArray();
} catch (SignatureCardException e) {
- // expected
throw new CancelledException();
}
@@ -195,7 +193,7 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
}
- @Test(expected = CancelledException.class)
+ @Test
public void testSignDECConcurrent() throws SignatureCardException,
InterruptedException, CardNotSupportedException,
NoSuchAlgorithmException, IOException {
@@ -207,10 +205,8 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
try {
signatureCard.getCertificate(KeyboxName.CERTIFIED_KEYPAIR, null);
- assertTrue(false);
- return null;
+ return "1234".toCharArray();
} catch (SignatureCardException e) {
- // expected
throw new CancelledException();
}
}