-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTestEnabled.java
More file actions
48 lines (39 loc) · 1.34 KB
/
TestEnabled.java
File metadata and controls
48 lines (39 loc) · 1.34 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
package com.testcase;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.mapper.CodeProperties;
import com.mapper.CodePropertiesLookup;
public class TestEnabled extends Assert {
@Test
public void testCaseIsoCode() throws InterruptedException {
CodeProperties isoCode = CodePropertiesLookup.getCodeProperties("XDR");
Assert.assertEquals(isoCode.getCurrencyCode(), "960"); //---Exception
Assert.assertEquals(isoCode.getCurrencyName(), "SDR (Special Drawing Right)");
Assert.assertEquals(isoCode.getFractionDigits(), -1);
Assert.assertEquals(isoCode.getSymbol(), "XDR");
}
@Test
public void testCaseNumCode() {
CodeProperties numCode = CodePropertiesLookup.getCodeProperties("414");
Assert.assertEquals(numCode.getCurrencyCode(), "414");
Assert.assertEquals(numCode.getCurrencyName(), "Kuwaiti Dinar");
Assert.assertEquals(numCode.getFractionDigits(), 3);
Assert.assertEquals(numCode.getSymbol(), "KWD");
}
@Test(ignoreMissingDependencies=true,dependsOnMethods="testCase")
public void dependsMethod() {
System.out.println("dependsMethod");
}
@Test(enabled=false)
public void testCaseInvalidArgument() {
CodeProperties numCode = CodePropertiesLookup.getCodeProperties("ABC");
}
@Test(timeOut=1000)
public void testTimeout() {
try {
Thread.sleep(500);
} catch (Exception e) {
//Ignore
}
}
}