Ejemplo n.º 1
0
        public void setUp()
        {
            /*
             * We dont create a mock of our Decoder class, as it is the class from which we test from
             */

            //if we test multiple classes in conjunction, we add mocks here:

            _utility  = Substitute.For <IUtility>();
            _reciever = Substitute.For <ITransponderReceiver>();

            //Constructor injection
            _uut = new Decoder(_reciever, _utility);

            _uut.DecodedDataReadyEvent += (o, args) => { numberOfEventTriggered++; };
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Using the real transponder data receiver

            ITransponderReceiver receiver = TransponderReceiverFactory.CreateTransponderDataReceiver();

            IDecoder decoder = new classes.Decoder(receiver, new Utility());

            IAnalyser analyser = new Analyser(new Utility(), decoder);

            IConsoleOutPutter consoleOutPutter = new ConsoleOutPutter(analyser);

            ILog log = new Log(analyser);

            while (true)
            {
                Thread.Sleep(1000);
            }
        }