コード例 #1
0
        public void ChipDigger_Dig_HavingDurabilityEqualsZero_ReturnsEmptyScoop()
        {
            diggerState.Durability.Current = 0;
            var chipDigger = ChipDigger.FromState(diggerState);
            var scoop      = chipDigger.Dig(TimeSpan.FromSeconds(20));

            scoop.Failed.ShouldBeTrue();
        }
コード例 #2
0
        public void ChipDigger_HavingSiteChipDensityIsNormal_ChipsYieldIsBetween3and9()
        {
            var mineClaim = new MineClaimState {
                ChipDensity = ChipDensity.Normal
            };

            diggerState.MineClaim          = mineClaim;
            diggerState.Durability.Current = 1;
            var chipDigger = ChipDigger.FromState(diggerState);
            var scoop      = chipDigger.Dig(TimeSpan.FromSeconds(20));

            scoop.ChipsDug.ShouldBeGreaterThanOrEqualTo(3);
            scoop.ChipsDug.ShouldBeLessThanOrEqualTo(9);
        }