summaryrefslogtreecommitdiff
path: root/smcc/src/test/java/at
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-08-13 09:09:06 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-08-13 09:09:06 +0000
commit497f6336cc96cd3b2b4cd760774ec4c2ed892df2 (patch)
tree8dfdd6467af2a2f22d11c12ff08801371b7ada39 /smcc/src/test/java/at
parent2dc37cef3cb0f5aa4dcc7a3bb28259181e6f5b3e (diff)
downloadmocca-497f6336cc96cd3b2b4cd760774ec4c2ed892df2.tar.gz
mocca-497f6336cc96cd3b2b4cd760774ec4c2ed892df2.tar.bz2
mocca-497f6336cc96cd3b2b4cd760774ec4c2ed892df2.zip
[#436] resolve "#PIN digits" message via message resource bundle
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@418 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/test/java/at')
-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);
}
}
}