forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiban-tests.ts
53 lines (47 loc) · 1.24 KB
/
iban-tests.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/// <reference path="iban.d.ts" />
/**
* @summary Test for "electronicFormat" method.
*/
function testElectronicFormat() {
var iban: string = 'BE68539007547034';
var format: string = IBAN.electronicFormat(iban);
}
/**
* @summary Test for "fromBBAN" method.
*/
function testFromBBAN() {
var countryCode: string = 'fr';
var bban: string = 'BBBBBGGGGGCCCCCCCCCCCKK';
var iban: string = IBAN.fromBBAN(countryCode, bban);
}
/**
* @summary Test for "isValid" method.
*/
function testIsValid() {
var iban: string = 'BE68539007547034';
var valid: boolean = IBAN.isValid(iban);
}
/**
* @summary Test for "isValidBBAN" method.
*/
function testIsValidBBAN() {
var countryCode: string = 'fr';
var bban: string = 'BBBBBGGGGGCCCCCCCCCCCKK';
var valid: boolean = IBAN.isValidBBAN(countryCode, bban);
}
/**
* @summary Test for "printFormat" method.
*/
function testPrintFormat() {
var iban: string = 'BE68539007547034';
var separator: string[] = ['fr'];
var format: string = IBAN.printFormat(iban, separator);
}
/**
* @summary Test for "toBBAN" method.
*/
function testToBBAN() {
var iban: string = 'BE68539007547034';
var separator: string[] = ['-'];
var bban: string = IBAN.toBBAN(iban, separator);
}