Skip to content

Commit

Permalink
Issue #1 增加負數測試案例
Browse files Browse the repository at this point in the history
  • Loading branch information
mouson committed Jan 10, 2017
1 parent 447e7da commit f3d19bc
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit f3d19bc

Please sign in to comment.