public void ReturnsValidData() { bool result = true; List <List <string> > response = MinesweeperWorker.GetRandomGrid(); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { if ((response[i][j] != "bomb") && (response[i][j] != "empty")) { result = false; break; } } } Assert.IsTrue(result); }
public void ReturnsListOfListOfStrings() { object response = MinesweeperWorker.GetRandomGrid(); Assert.AreSame(response.GetType(), typeof(List <List <string> >)); }
public ActionResult Data() { return(Json(MinesweeperWorker.GetRandomGrid(), JsonRequestBehavior.AllowGet)); }