Exemplo n.º 1
0
        public void DuplicatedPowerUp()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "powerup_002");
            PAssert.That(() => sniffer.ShipCounter.Now == 218);
        }
Exemplo n.º 2
0
        public void Ship7Battle()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "ship7battle_001");
            PAssert.That(() => sniffer.Battle.ResultRank == BattleResultRank.P);
        }
Exemplo n.º 3
0
        public void AppendsFailedOnFailure()
        {
            var msgLines = PAssertLines(() => PAssert.That(() => false));

            Assert.That(msgLines[0], Is.EqualTo(@"false  :  failed"));
            Assert.That(msgLines.Length, Is.EqualTo(1));
        }
Exemplo n.º 4
0
        public void AnchorageRepair()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "anchorage_repair_001");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 5
0
        public void SpMidnightWithoutBattle()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "sp_midnight_001");
            PAssert.That(() => sniffer.Battle.ResultRank == BattleResultRank.D);
        }
Exemplo n.º 6
0
        public void NotWarnDamaged1StShipInGuardFleet()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "combined_battle_004");
            PAssert.That(() => !sniffer.BadlyDamagedShips.Any());
        }
Exemplo n.º 7
0
        public void EnemyGuardSlot()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "enemy_combined_001");
            PAssert.That(() => sniffer.Battle.Result.Enemy.Guard[0].Slot[0].Spec.Id == 506);
        }
Exemplo n.º 8
0
        public void FullFlagshipAndOthers()
        {
            var fs = _fleet.Ships[0];

            fs.Fuel         = 9;
            fs.Spec.FuelMax = 9;
            fs.Bull         = 9;
            fs.Spec.BullMax = 9;
            var second = _fleet.Ships[1];

            second.Fuel         = 3;
            second.Spec.FuelMax = 9;
            second.Bull         = 9;
            second.Spec.BullMax = 9;
            var third = _fleet.Ships[2];

            third.Fuel         = 7;
            third.Spec.FuelMax = 9;
            third.Bull         = 0;
            third.Spec.BullMax = 9;
            var stat = _fleet.ChargeStatus;

            PAssert.That(() => stat.Fuel == 7 && stat.FuelRatio == 3 / 9.0);
            PAssert.That(() => stat.Bull == 9 && stat.BullRatio == 0.0);
        }
Exemplo n.º 9
0
        public void NoShips()
        {
            var stat = _fleet.ChargeStatus;

            PAssert.That(() => stat.Fuel == 0 && stat.Bull == 0);
            PAssert.That(() => stat.Empty);
        }
Exemplo n.º 10
0
        public void Ship2ReturnShipSpecifiedByRequest()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "ship2_001");
            PAssert.That(() => sniffer.ShipCounter.Now == 243);
        }
Exemplo n.º 11
0
        public void PracticeExpPoint()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "practice_004");
            PAssert.That(() => sniffer.MiscText == "[演習情報]\r\n敵艦隊名 : 第一艦隊\r\n獲得経験値 : 878\r\nS勝利 : 1053");
        }
Exemplo n.º 12
0
        public void TwoFleets()
        {
            var sniffer = new Sniffer(true);

            SniffLogFile(sniffer, "twofleets_001");
            PAssert.That(() => new[] { 5, 5, 0, 0 }.SequenceEqual(sniffer.Fleets.Select(f => f.ChargeStatus.Fuel)));
        }
Exemplo n.º 13
0
        public void NyukyoLessThanOrEqualTo1Min()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "nyukyo_001");
            PAssert.That(() => sniffer.RepairList.Length == 1);
        }
Exemplo n.º 14
0
        public void MarriageResult()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "marriage_001");
            PAssert.That(() => sniffer.Fleets[0].Ships[2].Level == 100);
        }
Exemplo n.º 15
0
        public void DamagedShipWarningOnMapStart()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "mapstart_001");
            PAssert.That(() => sniffer.BadlyDamagedShips.SequenceEqual(new[] { "大潮" }));
        }
Exemplo n.º 16
0
        public void NotVerifyBattleResultAfterPractice()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "practice_001");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 17
0
        public void NotWarnDamagedShipInCombinedFleetOnMapStart()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "mapstart_002");
            PAssert.That(() => !sniffer.BadlyDamagedShips.Any());
        }
Exemplo n.º 18
0
        public void NotTriggerDameConInPractice()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "practice_002");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 19
0
        public void LdShooting()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "ld_shooting_001");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 20
0
        public void DamagedShipListNotShowShipInPractice()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "practice_003");
            PAssert.That(() => sniffer.RepairList.Select(s => s.Name).SequenceEqual(new[] { "飛龍改二", "翔鶴改二" }));
        }
Exemplo n.º 21
0
        public void NotWarnDamagedShipWithDamageControl()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "damecon_advance_001");
            PAssert.That(() => sniffer.BadlyDamagedShips.Length == 0);
        }
Exemplo n.º 22
0
        public void ClosingTorpedoInCombinedBattle()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "combined_battle_002");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 23
0
        public void IgnoreDamagedShips()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "endpoint_001");
            PAssert.That(() => sniffer.BadlyDamagedShips.Length == 0);
        }
Exemplo n.º 24
0
        public void SmallCombinedFleetBattle()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "combined_battle_003");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 25
0
        public void BattleShipAttackInMidnight()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "midnight_001");
            PAssert.That(() => sniffer.Battle.ResultRank == BattleResultRank.S);
        }
Exemplo n.º 26
0
        public void NightToDay()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "nighttoday_001");
            PAssert.That(() => !sniffer.IsBattleResultError);
        }
Exemplo n.º 27
0
        public void ClassStructFieldsAffectHash()
        {
            var object1 = new SampleClass {
                PlainStruct = new CustomStruct {
                    Bla = 1
                }
            };
            var object2 = new SampleClass {
                PlainStruct = new CustomStruct {
                    Bla = 2
                }
            };
            var object3A = new SampleClass {
                PlainStruct = new CustomStruct {
                    Bla = 3
                }
            };
            var object3B = new SampleClass {
                PlainStruct = new CustomStruct {
                    Bla = 3
                }
            };

            PAssert.That(() => FieldwiseHasher.Hash(object1) != FieldwiseHasher.Hash(object2));
            PAssert.That(() => FieldwiseHasher.Hash(object3A) == FieldwiseHasher.Hash(object3B));
        }
Exemplo n.º 28
0
        // ReSharper disable once InconsistentNaming
        public void SpMidnightIn2ndSequence()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "sp_midnight_003");
            PAssert.That(() => sniffer.CellInfo.Current == "1戦目(夜戦)");
        }
Exemplo n.º 29
0
        public void AppendsSingleLineMessageWithNewlineOnFailure()
        {
            var msgLines = PAssertLines(() => PAssert.That(() => false, "oops\n"));

            Assert.That(msgLines[0], Is.EqualTo(@"false  :  oops"));
            Assert.That(msgLines.Length, Is.EqualTo(1));
        }
Exemplo n.º 30
0
        public void PowerUpResult()
        {
            var sniffer = new Sniffer();

            SniffLogFile(sniffer, "powerup_001");
            PAssert.That(() => Abs(sniffer.Fleets[0].Ships[0].EffectiveFirepower - 30) < 0.0001);
        }