From f8ae307cb81e4602850bb4b5140f9ee60059e94c Mon Sep 17 00:00:00 2001 From: mouson Date: Tue, 10 Jan 2017 03:51:56 +0800 Subject: [PATCH] =?UTF-8?q?Issue=20#1=20=E5=BB=BA=E7=AB=8B=20Double=20?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=88=9D=E5=A7=8B=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DoubleSequenceCalculator.php | 28 +++++++++++++++ .../DoubleSequenceCalculatorTest.php | 35 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/Helpers/SequenceCalculator/DoubleSequenceCalculator.php create mode 100644 tests/Mouson/Helpers/SequenceCalculator/DoubleSequenceCalculatorTest.php diff --git a/src/Helpers/SequenceCalculator/DoubleSequenceCalculator.php b/src/Helpers/SequenceCalculator/DoubleSequenceCalculator.php new file mode 100644 index 0000000..e2fe20b --- /dev/null +++ b/src/Helpers/SequenceCalculator/DoubleSequenceCalculator.php @@ -0,0 +1,28 @@ +getSequenceName(); + + /** Assert */ + $this->assertEquals($expected, $actual); + } + + public function test_測試雙倍數列輸入0應回傳0() + { + /** Arrange */ + $target = new DoubleSequenceCalculator(); + $value = 0; + /** Assume */ + $expected = 0; + + /** Act */ + $actual = $target->calculate($value); + + /** Assert */ + $this->assertEquals($expected, $actual); + } +}