public void Parse_ValidParse_ElementEqualsExpected <TSet, TStruct, TParser> (
            TSet hack1,
            TStruct hack2,
            TParser hack3,
            MatrixParser <TSet, TStruct, TParser> parser,
            String inputString,
            Matrix <TSet, TStruct> expected)
            where TStruct : IStructure, new()
            where TParser : IParser <TSet>, new()
        {
            var result = parser.Parse(inputString);

            Assert.IsNotNull(result);

            Assert.AreEqual(expected, result);
        }
Beispiel #2
0
 public Matrix(string input)
 {
     items   = parser.Parse(input);
     rows    = items.Length;
     columns = (items.FirstOrDefault() ?? throw new Exception("The matrix is empty.")).Length;
 }