Ejemplo n.º 1
0
        public void CanCreatePulserFromAsyncPulser()
        {
            var pulser = new DummyPulser().ToPulser();
            var list = new List<Event>();
            pulser.PulseGenerated += (sender, events) => list.AddRange(events);
            pulser.Start();
            Thread.Sleep(1900);
            pulser.Stop();
            Assert.Equal(2, list.Count);
            Assert.Equal("Dummy",list.First().EventType);

        }
Ejemplo n.º 2
0
        public void CanCreatePulserFromAsyncPulser()
        {
            var pulser = new DummyPulser().ToPulser();
            var list   = new List <Event>();

            pulser.PulseGenerated += (sender, events) => list.AddRange(events);
            pulser.Start();
            Thread.Sleep(1900);
            pulser.Stop();
            Assert.Equal(2, list.Count);
            Assert.Equal("Dummy", list.First().EventType);
        }