public void RotateMatrixTest() { Amatrix amatrix = new Amatrix(); amatrix.GenerateMatrix(5); amatrix.RotateMatrix(); Assert.IsNotNull(amatrix.Matrix); }
public void ReadMatrixTest() { Amatrix amatrix = new Amatrix(); string[] textLines = new string[] { "1;2;3", "4;5;6", "7;8;9" }; amatrix.ReadMatrix(textLines); Assert.IsNotNull(amatrix.Matrix); }
public void About() { // Arrange IAmatrix m = new Amatrix(); HomeController controller = new HomeController(m); // Act ViewResult result = controller.About() as ViewResult; // Assert Assert.IsNotNull(result); }
public void DownloadCSV() { // Arrange IAmatrix m = new Amatrix(); HomeController controller = new HomeController(m); // Act controller.GenerateMatrix(5); FileContentResult result = controller.DownloadCSV("test") as FileContentResult; // Assert Assert.IsNotNull(result.FileContents); }
public void GenerateMatrix() { // Arrange IAmatrix m = new Amatrix(); HomeController controller = new HomeController(m); // Act ViewResult result = controller.GenerateMatrix(5) as ViewResult; var r = (result.Model as Tuple <int[][], int>).Item2; // Assert Assert.AreEqual(5, r); }