15331334 徐楚燕 testreport
version 1.0.0
修訂歷史
日期 | 版本 | 作者 | 描述 |
---|---|---|---|
2017.03.26 | 1.0.0 | 徐楚燕 | 初始版本 |
Class JumperTest
Description
This class is used to test class Jumper
.
測試計劃
測試Jumper
類的 move()
, canMove()
, act()
,putSelfInGrid()
函數。
Method Summary
testPutSelf
Test for putSelfInGrid()
.
Test Result: Pass. putSelfInGrid() works fine.
testcanMovewithActors
Test the return value of canMove()
when Actor
s and Jumper
are positioned like this:
Test Result: All test for canMove() returns false. Test Pass.
canMove() works fine.
testAct
Given in BoundedGrid
, starting from (0,0), test the result Location
of invoking five times of act()
.
Test Result: This test fail as the test condition(0,7) is wrong.
act() works fine.
testMoveinUnbounded
Given in UnboundedGrid
, starting from (0,0), test the result of invoking Move()
.
Test Result: In unboundedGrid, Actor can have location with negative values. Test Pass.
move() works fine in UnboundedGrid.
testMoveinBounded
Given in BoundedGrid
, starting from (0,0), test the result of invoking Move()
.
Test Result: In BoundedGrid, Actor can not have location with negative values. Invoking move() directly cause the Jumper moves into invalid grid and therefore elimates itself.
As a result, this test will pass because the location will be null.
Test Pass.
move() works fine in BoundedGrid.
testcanMoveinBounded
Given in BoundedGrid
, starting from (0,0), test the return value of canMove()
.
Test Result: The first test of canMove() will get a false value as the Jumper faces north at the initial state. Test Pass.
canMove() works fine in BoundedGrid.