-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTestAlwaysRun.java
More file actions
53 lines (37 loc) · 1.72 KB
/
TestAlwaysRun.java
File metadata and controls
53 lines (37 loc) · 1.72 KB
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
package com.testcase;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.mapper.CodeProperties;
import com.mapper.CodePropertiesLookup;
public class TestAlwaysRun {
public CodeProperties code = null;
@Test
public void test() {
System.out.println("Modified Test");
}
@Test(description="test")
public void testNumericCode(){
System.out.println("+==============testNumericCode============+");
String isoCode[] = {"AOA","XOF","XDR","KWD","CLF","CHW","SSP","CLF","CHW","UYI","XBB","XBC"};
String expected [] = {"973","952","960","414","990","948","728","990","948","940","956","957"};
String actual[] = new String[isoCode.length];
for(int i = 0; i < isoCode.length; i++){
code = CodePropertiesLookup.getCodeProperties(isoCode[i]);
actual[i] = code.getCurrencyCode();
}
Assert.assertEquals(actual, expected);
Assert.assertEquals("a", "b");
}
@Test(dependsOnMethods={"testNumericCode"},alwaysRun=true)
public void testCurrencyName(){
System.out.println("+==============testCurrencyName============+");
String isoCode[] = {"AOA","XOF","XDR","KWD","CLF","CHW","SSP","CLF","CHW","UYI","XBB","XBC"};
String expected [] = {"Kwanza","CFA Franc BCEAO","SDR (Special Drawing Right)","Kuwaiti Dinar","Unidad de Fomento","WIR Franc","South Sudanese Pound","Unidad de Fomento","WIR Franc","Uruguay Peso en Unidades Indexadas (URUIURUI)","Bond Markets Unit European Monetary Unit (E.M.U.-6)","Bond Markets Unit European Unit of Account 9 (E.U.A.-9)"};
String actual[] = new String[isoCode.length];
for(int i = 0; i < isoCode.length; i++){
code = CodePropertiesLookup.getCodeProperties(isoCode[i]);
actual[i] = code.getCurrencyName();
}
Assert.assertEquals(actual, expected);
}
}