Lack of interfaces makes mocks time intensive

Hello,

I am just starting to put together my first project and immediately noticed that the GHIElectronics.NETMF.Hardware.AnalogIn lacks an interface.

I can work around this by extracting an interface and implementing my own class, but it is time intensive.

Could you please put it on your todo list to create interfaces around these classes (input and output) so that we can create mocks off of them?

Just as an example - in order to be able to create unit tests using the analog input, I must create the following:


using System;
using GHIElectronics.NETMF.Hardware;

namespace GHIElectronics.NETMF.Hardware.UnitTestable
{
    public interface IAnalogIn : IDisposable
    {
        int Read();
        void SetLinearScale(int minValue, int maxValue);
    }

    public class AnalogInTestable : AnalogIn
    {
        public AnalogInT(AnalogIn.Pin ain) : base(ain)
        {
        }

        public static IAnalogIn CreateInstance(AnalogIn.Pin ain)
        {
            return (IAnalogIn) new AnalogInT(ain);
        }
    }
}

ok, we will look into it,.