summaryrefslogtreecommitdiff
path: root/smcc/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'smcc/src/test')
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/CardTest.java8
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/starcos/STARCOSCardTest.java26
2 files changed, 17 insertions, 17 deletions
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/CardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/CardTest.java
index f72820e1..2a55357d 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/CardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/CardTest.java
@@ -76,14 +76,14 @@ public abstract class CardTest {
}
- public class TestWrongPINProvider implements PINProvider {
+ public class TestInvalidPINProvider implements PINProvider {
int provided = 0;
int numWrongTries = 0;
char[] pin;
- public TestWrongPINProvider(char[] pin, int numWrongTries) {
+ public TestInvalidPINProvider(char[] pin, int numWrongTries) {
super();
this.pin = pin;
this.numWrongTries = numWrongTries;
@@ -105,7 +105,7 @@ public abstract class CardTest {
}
}
- public class TestWrongChangePINProvider implements ChangePINProvider {
+ public class TestInvalidChangePINProvider implements ChangePINProvider {
int provided = 0;
int numWrongTries = 0;
@@ -114,7 +114,7 @@ public abstract class CardTest {
char[] oldPin;
/** emulate ChangePinProvider */
- public TestWrongChangePINProvider(char[] oldPin, char[] newPin, int numWrongTries) {
+ public TestInvalidChangePINProvider(char[] oldPin, char[] newPin, int numWrongTries) {
super();
this.pin = newPin;
this.oldPin = oldPin;
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/starcos/STARCOSCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/starcos/STARCOSCardTest.java
index bf56ef47..89e2ca65 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/starcos/STARCOSCardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/starcos/STARCOSCardTest.java
@@ -294,7 +294,7 @@ public class STARCOSCardTest extends CardTest {
}
@Test
- public void testVerifyWrongPin() throws CardNotSupportedException,
+ public void testVerifyInvalidPin() throws CardNotSupportedException,
LockedException, NotActivatedException, CancelledException,
PINFormatException, SignatureCardException, InterruptedException {
@@ -309,20 +309,20 @@ public class STARCOSCardTest extends CardTest {
for (PINSpec pinSpec : signatureCard.getPINSpecs()) {
- char[] wrongPin = "999999".toCharArray();
- int numWrongTries = 2;
- TestWrongPINProvider wrongPinProvider = new TestWrongPINProvider(wrongPin, numWrongTries);
+ char[] invalidPin = "999999".toCharArray();
+ int numInvalidTries = 2;
+ TestInvalidPINProvider invalidPinProvider = new TestInvalidPINProvider(invalidPin, numInvalidTries);
try {
- signatureCard.verifyPIN(pinSpec, wrongPinProvider);
+ signatureCard.verifyPIN(pinSpec, invalidPinProvider);
} catch (CancelledException ex) {
} finally {
- assertTrue(wrongPinProvider.getProvided() == numWrongTries);
+ assertTrue(invalidPinProvider.getProvided() == numInvalidTries);
}
}
}
@Test
- public void testChangeWrongPin() throws CardNotSupportedException,
+ public void testChangeInvalidPin() throws CardNotSupportedException,
LockedException, NotActivatedException, CancelledException,
PINFormatException, SignatureCardException, InterruptedException {
char[] defaultPin = "123456".toCharArray();
@@ -336,16 +336,16 @@ public class STARCOSCardTest extends CardTest {
for (PINSpec pinSpec : signatureCard.getPINSpecs()) {
- char[] wrongPin = "999999".toCharArray();
- int numWrongTries = 2;
- TestWrongChangePINProvider wrongPinProvider =
- new TestWrongChangePINProvider(wrongPin, defaultPin, numWrongTries);
+ char[] invalidPin = "999999".toCharArray();
+ int numInvalidTries = 2;
+ TestInvalidChangePINProvider invalidPinProvider =
+ new TestInvalidChangePINProvider(invalidPin, defaultPin, numInvalidTries);
try {
- signatureCard.changePIN(pinSpec, wrongPinProvider);
+ signatureCard.changePIN(pinSpec, invalidPinProvider);
} catch (CancelledException ex) {
} finally {
- assertTrue(wrongPinProvider.getProvided() == numWrongTries);
+ assertTrue(invalidPinProvider.getProvided() == numInvalidTries);
}
}
}