Archived
0

Parser PP - takingControl is control, add test

This commit is contained in:
iMoHax
2016-11-03 10:14:16 +03:00
parent 40050781b5
commit 8a133974d7
4 changed files with 21 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ public class PPParser {
case "blocked": return POWER_STATE.NONE;
case "control": return POWER_STATE.CONTROL;
case "contested": return POWER_STATE.CONTESTED;
case "takingControl": return POWER_STATE.EXPANSION;
case "takingControl": return POWER_STATE.CONTROL;
case "turmoil": return POWER_STATE.NONE;
default:
LOG.warn("Unknown power state: {}", value);

View File

@@ -33,6 +33,7 @@ public class PPImportTest extends Assert {
PPParser parser = new PPParser(market);
parser.parseSystems(new File(getClass().getResource("/pp.csv").getFile()));
parser.parsePrediction(new File(getClass().getResource("/pppre.csv").getFile()));
assertEquals(POWER_STATE.CONTROL, opala.getPowerState());
assertEquals(POWER.MAHON, opala.getPower());

View File

@@ -1,8 +1,7 @@
"Id","Power Id","Value","State","Upkeep Default","Upkeep Current","Income","Controlstarsystem Id","Qty For","Qty Against","Thr For","Thr Against","Prediction","В "
"Opala (78755)","Edmund Mahon (100010)","7","control","23","23","131","","2842","4650","2818","13778","FORTIFY",""
"Opala (78755)","Edmund Mahon (100010)","7","takingControl","23","23","131","","2842","4650","2818","13778","FORTIFY",""
"Gui Xian (3932411564754)","A. Lavigny-Duval (100020)","10","control","22","0","99","","2760","0","2760","15031","FORTIFY",""
"Bolg (2871588038081)","Aisling Duval (100000)","8","control","24","24","65","","6413","0","6213","10701","FORTIFY",""
"26 Draconis (2869440619961)","Archon Delaine (100100)","6","takingControl","0","0","0","","3690","24830","6632","9652","FAIL",""
"Gyhldekala (2869977687521)","Yuri Grom (100120)","0","control","28","28","108","","4993","420","3725","8507","FORTIFY",""
"GD 319 (9467584587225)","Edmund Mahon (100010)","0","control","0","0","0","Lundji (11666876278233)","","","","","PASS",""
"Ithaca (77805)","Edmund Mahon (100010)","5","blocked","22","22","112","","1749","2070","5314","18818","PASS",""
1 Id Power Id Value State Upkeep Default Upkeep Current Income Controlstarsystem Id Qty For Qty Against Thr For Thr Against Prediction В 
2 Opala (78755) Edmund Mahon (100010) 7 control takingControl 23 23 131 2842 4650 2818 13778 FORTIFY
3 Gui Xian (3932411564754) A. Lavigny-Duval (100020) 10 control 22 0 99 2760 0 2760 15031 FORTIFY
4 Bolg (2871588038081) Aisling Duval (100000) 8 control 24 24 65 6413 0 6213 10701 FORTIFY
26 Draconis (2869440619961) Archon Delaine (100100) 6 takingControl 0 0 0 3690 24830 6632 9652 FAIL
5 Gyhldekala (2869977687521) Yuri Grom (100120) 0 control 28 28 108 4993 420 3725 8507 FORTIFY
6 GD 319 (9467584587225) Edmund Mahon (100010) 0 control 0 0 0 Lundji (11666876278233) PASS
7 Ithaca (77805) Edmund Mahon (100010) 5 blocked 22 22 112 1749 2070 5314 18818 PASS

View File

@@ -0,0 +1,18 @@
"Furuhjelm III-674 (10976)","Denton Patreus (100050)","110","FAIL","Can not afford","131","-338"
"Wu Guinagi (2346956310883)","Denton Patreus (100050)","100","FAIL","Can not afford","53","-469"
"Wardhara (7269097547201)","Denton Patreus (100050)","73","FAIL","Can not afford","117","-522"
"Chino (13865362072985)","Denton Patreus (100050)","52","FAIL","Can not afford","128","-639"
"Derrim (50393)","Denton Patreus (100050)","","FAIL","Another power has a higher preparation value","148",""
"Sothis (3137146456387)","Edmund Mahon (100010)","8,032","SUCCESS","","",""
"Furuhjelm III-674 (10976)","Edmund Mahon (100010)","4,075","FAIL","Can not afford","121","49"
"Hera (34362)","Edmund Mahon (100010)","2,462","FAIL","Can not afford","91","-72"
"LHS 2494 (115427)","Edmund Mahon (100010)","1,681","FAIL","Can not afford","77","-163"
"26 Draconis (2869440619961)","Archon Delaine (100100)","1,397","SUCCESS","","",""
"Pontae (3107576681186)","Edmund Mahon (100010)","1,171","FAIL","Can not afford","114","-330"
"Ao Qin (72583)","Edmund Mahon (100010)","990","FAIL","Can not afford","91","-444"
"Ceos (2278152997195)","Edmund Mahon (100010)","968","FAIL","Can not afford","265","-535"
"NLTT 2969 (2351)","Edmund Mahon (100010)","823","FAIL","Can not afford","121","-800"
"Loperada (2868635903401)","Edmund Mahon (100010)","510","FAIL","Can not afford","68","-921"
"HIP 47328 (67792)","Felicia Winters (100040)","7,186","SUCCESS","","",""
"169 G. Canis Majoris (66434)","Felicia Winters (100040)","6,755","SUCCESS","","",""
"Sothis (3137146456387)","Felicia Winters (100040)","4,256","FAIL","Can not afford","302","121"
1 Furuhjelm III-674 (10976) Denton Patreus (100050) 110 FAIL Can not afford 131 -338
2 Wu Guinagi (2346956310883) Denton Patreus (100050) 100 FAIL Can not afford 53 -469
3 Wardhara (7269097547201) Denton Patreus (100050) 73 FAIL Can not afford 117 -522
4 Chino (13865362072985) Denton Patreus (100050) 52 FAIL Can not afford 128 -639
5 Derrim (50393) Denton Patreus (100050) FAIL Another power has a higher preparation value 148
6 Sothis (3137146456387) Edmund Mahon (100010) 8,032 SUCCESS
7 Furuhjelm III-674 (10976) Edmund Mahon (100010) 4,075 FAIL Can not afford 121 49
8 Hera (34362) Edmund Mahon (100010) 2,462 FAIL Can not afford 91 -72
9 LHS 2494 (115427) Edmund Mahon (100010) 1,681 FAIL Can not afford 77 -163
10 26 Draconis (2869440619961) Archon Delaine (100100) 1,397 SUCCESS
11 Pontae (3107576681186) Edmund Mahon (100010) 1,171 FAIL Can not afford 114 -330
12 Ao Qin (72583) Edmund Mahon (100010) 990 FAIL Can not afford 91 -444
13 Ceos (2278152997195) Edmund Mahon (100010) 968 FAIL Can not afford 265 -535
14 NLTT 2969 (2351) Edmund Mahon (100010) 823 FAIL Can not afford 121 -800
15 Loperada (2868635903401) Edmund Mahon (100010) 510 FAIL Can not afford 68 -921
16 HIP 47328 (67792) Felicia Winters (100040) 7,186 SUCCESS
17 169 G. Canis Majoris (66434) Felicia Winters (100040) 6,755 SUCCESS
18 Sothis (3137146456387) Felicia Winters (100040) 4,256 FAIL Can not afford 302 121