// Copyright 2017-2018 Alexander Luzgarev using System.IO; namespace MatFileHandler.Tests { /// /// Factory providing the parsed contents of .mat files. /// public class MatTestDataFactory : AbstractTestDataFactory { /// /// Initializes a new instance of the class. /// /// Directory containing test files. public MatTestDataFactory(string testDirectory) : base( testDirectory, new ExtensionTestFilenameConvention("mat")) { } /// /// Read and parse data from a .mat file. /// /// Input stream. /// Parsed contents of the file. protected override IMatFile ReadDataFromStream(Stream stream) { var matFileReader = new MatFileReader(stream); var matFile = matFileReader.Read(); return matFile; } } }