Example #1
0
        public void SetUp()
        {
            _communicationInterface = Substitute.For<ICommunicationInterface>();
            _databaseHandler = Substitute.For<IDatabaseHandler>();
            _configProvider = Substitute.For<IConfigprovider>();

            _main = new DbWriterMain(_communicationInterface, _databaseHandler, _configProvider);
        }
Example #2
0
        public void Start()
        {
            var configprovider = new Config();

            if (_main == null)
            {
                _lcd = new Lcd(new RaspSharpView(), new DbReader(configprovider));
                _main = new DbWriterMain(new CommunicationInterfaceImp(new SerialPortWrapper()), new DatabaseHandler(configprovider), configprovider);
            }
            _lcd.Start(TimeSpan.FromSeconds(30));
            _main.Start();
        }