Added test to force unique china values
This commit is contained in:
parent
5387c86ce0
commit
5e83c01a73
|
@ -22,7 +22,7 @@ public class BasePartFactoryTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGlobalChinaMap() {
|
public void testGlobalChinaKeyMap() {
|
||||||
Map<String,String> global = new HashMap<>();
|
Map<String,String> global = new HashMap<>();
|
||||||
for (int base:BasePartFactory.getSupportedBases()) {
|
for (int base:BasePartFactory.getSupportedBases()) {
|
||||||
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) {
|
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) {
|
||||||
|
@ -33,6 +33,18 @@ public class BasePartFactoryTest {
|
||||||
Assertions.assertTrue(global.size() > 1);
|
Assertions.assertTrue(global.size() > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGlobalChinaValueMap() {
|
||||||
|
Map<String,String> global = new HashMap<>();
|
||||||
|
for (int base:BasePartFactory.getSupportedBases()) {
|
||||||
|
for (BasePart part:BasePartFactory.buildBasePartsByBase(base)) {
|
||||||
|
Assertions.assertFalse(global.containsKey(part.getChinaValue()));
|
||||||
|
global.put(part.getChinaValue(), part.getChinaValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Assertions.assertTrue(global.size() > 1);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGlobalToneMap() {
|
public void testGlobalToneMap() {
|
||||||
boolean duplicate = false;
|
boolean duplicate = false;
|
||||||
|
|
Loading…
Reference in a new issue