Esempio n. 1
0
        public string GenerateMatrix([FromQuery(Name = "demension")] int demension = 4)
        {
            try
            {
                var matrix = _matrixGenerator.GenerateRandomMatrix(demension);

                _matrixStore.Save(_path, matrix);

                return(matrix.GetStringValue());
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Esempio n. 2
0
 public void GenerateRandomMatrix_DemensionZero_ThrowInvalidOperationException()
 {
     Assert.Throws <InvalidOperationException>(() => _matrixGenerator.GenerateRandomMatrix(0));
 }