}\r
}\r
\r
-\r
/// <summary>\r
/// 4-2-1で開幕対潜雷撃を含む戦闘を行う\r
/// </summary>\r
SniffLogFile(sniffer, "battle_001");\r
PAssert.That(() => sniffer.Battle.ResultRank == BattleResultRank.A);\r
AssertEqualBattleResult(sniffer,\r
- new []{57, 66, 50, 65, 40, 42}, new []{34, 5, 0, 0, 0, 0});\r
+ new[] {57, 66, 50, 65, 40, 42}, new[] {34, 5, 0, 0, 0, 0});\r
}\r
\r
- private void AssertEqualBattleResult(Sniffer sniffer, IEnumerable<int> expected, IEnumerable<int> enemy, string msg = null)\r
+ private void AssertEqualBattleResult(Sniffer sniffer, IEnumerable<int> expected, IEnumerable<int> enemy,\r
+ string msg = null)\r
{\r
var result = sniffer.GetShipStatuses(0).Select(s => s.NowHp);\r
PAssert.That(() => expected.SequenceEqual(result), msg);\r
}\r
\r
/// <summary>\r
+ /// 夜戦で戦艦が攻撃すると一回で三発分のデータが来る\r
+ /// そのうち存在しない攻撃はターゲット、ダメージともに-1になる\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void BattleShipAttackInMidnight()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "midnight_001");\r
+ PAssert.That(() => sniffer.Battle.ResultRank == BattleResultRank.S);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 7隻編成の戦闘で7隻目が攻撃される\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void Ship7Battle()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "ship7battle_001");\r
+ PAssert.That(() => sniffer.Battle.ResultRank == BattleResultRank.P);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 演習のあとのportで戦闘結果の検証を行わない\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void NotVerifyBattleResultAfterPractice()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "practice_001");\r
+ PAssert.That(() => !sniffer.IsBattleResultStatusError);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 連合艦隊が開幕雷撃で被弾する\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void OpeningTorpedoInCombinedBattle()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "combined_battle_001");\r
+ PAssert.That(() => !sniffer.IsBattleResultStatusError);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 連合艦隊が閉幕雷撃で被弾する\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void ClosingTorpedoInCombinedBattle()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "combined_battle_002");\r
+ PAssert.That(() => !sniffer.IsBattleResultStatusError);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 第一が6隻未満の連合艦隊で戦闘する\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void SmallCombinedFleetBattle()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "combined_battle_003");\r
+ PAssert.That(() => !sniffer.IsBattleResultStatusError);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 護衛退避する\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void EscapeWithEscort()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "escape_001");\r
+ PAssert.That(() => sniffer.GetShipStatuses(0)[5].Escaped &&\r
+ sniffer.GetShipStatuses(1)[2].Escaped);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 開幕夜戦に支援が来る\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void SpMidnightSupportAttack()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "sp_midnight_002");\r
+ PAssert.That(() => !sniffer.Battle.DisplayedResultRank.IsError);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 払暁戦を行う\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void NightToDay()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "nighttoday_001");\r
+ PAssert.That(() => !sniffer.Battle.DisplayedResultRank.IsError && !sniffer.IsBattleResultStatusError);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 単艦退避する\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void EscapeWithoutEscort()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "escape_002");\r
+ PAssert.That(() => sniffer.GetShipStatuses(2)[1].Escaped);\r
+ PAssert.That(() => !sniffer.IsBattleResultStatusError);\r
+ }\r
+\r
+ /// <summary>\r
/// 出撃時に大破している艦娘がいたら警告する\r
/// </summary>\r
[TestMethod]\r
{\r
var sniffer = new Sniffer();\r
SniffLogFile(sniffer, "baseaircorps_001");\r
- PAssert.That(() => sniffer.BaseAirCorps[0].AirCorps[0].FighterPower[1] == 301);\r
+ PAssert.That(() => sniffer.BaseAirCorps[0].AirCorps[0].FighterPower.AirCombat[1] == 301);\r
sniffer.BaseAirCorps[0].AirCorps[0].Action = 2; // 防空\r
- PAssert.That(() => sniffer.BaseAirCorps[0].AirCorps[0].FighterPower[1] == 320);\r
+ PAssert.That(() => sniffer.BaseAirCorps[0].AirCorps[0].FighterPower.Interception[1] == 320);\r
}\r
\r
/// <summary>\r
{\r
var sniffer = new Sniffer();\r
SniffLogFile(sniffer, "baseaircorps_002");\r
- PAssert.That(() => sniffer.BaseAirCorps[0].AirCorps[2].FighterPower[0] == 353);\r
+ PAssert.That(() => sniffer.BaseAirCorps[0].AirCorps[2].FighterPower.Interception[0] == 353);\r
}\r
\r
/// <summary>\r
{\r
var sniffer = new Sniffer();\r
SniffLogFile(sniffer, "baseaircorps_003");\r
- PAssert.That(() => sniffer.BaseAirCorps[1].AirCorps[0].FighterPower[0] == 121);\r
+ PAssert.That(() => sniffer.BaseAirCorps[1].AirCorps[0].FighterPower.AirCombat[0] == 121);\r
}\r
\r
/// <summary>\r
new[] {0, 0, 0, 0, 0, 0, 0, 0},\r
new[] {288194, 282623, 299496, 295958, 3000, 2968, 2997, 7},\r
new[] {288185, 282623, 299496, 295943, 3000, 2968, 2997, 7},\r
- new[] {288161, 282623, 299496, 295903, 3000, 2968, 2997, 7},\r
+ new[] {288161, 282623, 299496, 295903, 3000, 2968, 2997, 7}\r
};\r
PAssert.That(() => SequenceOfSequenceEqual(expected3, result3), "航空機の補充");\r
\r
new[] {0, 0, 0, 0, 0, 0, 0, 0},\r
new[] {261012, 252252, 298492, 279622, 3000, 2842, 3000, 22},\r
new[] {261012, 252252, 298492, 279538, 3000, 2842, 3000, 22},\r
- new[] {261012, 252252, 298492, 279454, 3000, 2842, 3000, 22},\r
+ new[] {261012, 252252, 298492, 279454, 3000, 2842, 3000, 22}\r
};\r
PAssert.That(() => SequenceOfSequenceEqual(expected4, result4), "航空機の配備");\r
}\r
SniffLogFile(sniffer, "nyukyo_001");\r
PAssert.That(() => sniffer.RepairList.Length == 1);\r
}\r
+\r
+ /// <summary>\r
+ /// 一括解体する(装備保管なしとあり)\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void DestroyShip()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "destroyship_001");\r
+ PAssert.That(() => sniffer.Item.NowShips == 250);\r
+ PAssert.That(() => sniffer.Item.NowEquips == 1118);\r
+ PAssert.That(() => sniffer.Material.Current.Take(4).SequenceEqual(new[] {285615, 286250, 291010, 284744}));\r
+ }\r
+\r
+ /// <summary>\r
+ /// 第2艦隊までしか解放していなくてもエラーにならないようにする\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void TwoFleets()\r
+ {\r
+ var sniffer = new Sniffer(true);\r
+ SniffLogFile(sniffer, "twofleets_001");\r
+ var expected = Enumerable.Repeat(new ChargeStatus(5, 5), ShipInfo.FleetCount);\r
+ PAssert.That(() => expected.SequenceEqual(sniffer.ChargeStatuses));\r
+ }\r
+\r
+ /// <summary>\r
+ /// ship2がリクエストで指定した艦娘のデータしか返さない\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void Ship2ReturnShipSpecifiedByRequest()\r
+ {\r
+ var sniffer = new Sniffer();\r
+ SniffLogFile(sniffer, "ship2_001");\r
+ PAssert.That(() => sniffer.Item.NowShips == 243);\r
+ }\r
}\r
}
\ No newline at end of file