There is a class that internally uses calls from the native library. Also inside the class there are private and public methods.
class Matrix { private List<IntPtr> _rows; [DllImport("MathCore.dll")] static private extern IntPtr CreateMatrixRow(string row); [DllImport("MathCore.dll")] static private extern IntPtr RemoveMatrixRow(int index); [DllImport("MathCore.dll")] static private extern void AddItem(IntPtr row, string name); [DllImport("MathCore.dll")] static private extern void RemoveItem(IntPtr row, string name); public Matrix(List<string> rows, string equation) { // some constructing ParseRows(rows); ParseEquation(equation); } private void ParseEquation(string equation) { // parse someIndex and someName AddItem(GetRow(someIndex), someName); } private void ParseRows(List<string> rows) { foreach (var row in rows) { _rows.Add(CreateMatrixRow(row)); } } public int GetRowCount() { return _rows.Count; } public int GetRow(int index) { return _rows[index]; } } What is the best way to split or change the implementation so that it can cover the Matrix class with UNITEST without calling the MathCore.dll library?
MathCore? - sp7