* with each cell of matrix as the center cell(trim those out of boundary articles),
* and fill rest cells with the other type articles.After activateArticle method
* invoked,asserts all circle are activated and all the other cells are not.
*/
private ArticleMatrix generateTestMatrix(int row,int col){
ArticleMatrix matrix = new ArticleMatrix();
int height = matrix.getHeight();
int width = matrix.getWidth();
//Fills target diamonds.
fillACross(row, col, matrix) ;
fillACross(row-3, col, matrix) ;
fillACross(row+3, col, matrix) ;
fillACross(row, col-3, matrix) ;
fillACross(row, col+3, matrix) ;
//Fills non-target diamonds.
for(int i=0;i<height;i++){
for(int j=0;j<width;j++){
if(matrix.getArticle(i, j)==null){
matrix.setArticle(i, j, ArticleFactory.getInstance().createArticle(ArticleEnum.GREEN_DIAMOND));
}
}
}
return matrix;
}