diff --git a/tests/Mouson/Helpers/SequenceCalculator/DoubleSequenceCalculatorTest.php b/tests/Mouson/Helpers/SequenceCalculator/DoubleSequenceCalculatorTest.php index a9de5e2..9f60c68 100644 --- a/tests/Mouson/Helpers/SequenceCalculator/DoubleSequenceCalculatorTest.php +++ b/tests/Mouson/Helpers/SequenceCalculator/DoubleSequenceCalculatorTest.php @@ -47,4 +47,19 @@ public function test_測試雙倍數列輸入2應回傳4() /** Assert */ $this->assertEquals($expected, $actual); } + + public function test_測試雙倍數列輸入負數應回傳兩倍負數() + { + /** Arrange */ + $target = new DoubleSequenceCalculator(); + $value = -2; + /** Assume */ + $expected = -4; + + /** Act */ + $actual = $target->calculate($value); + + /** Assert */ + $this->assertEquals($expected, $actual); + } }