public void ctor_initializes_all_fileds_correctly()
        {
            var time   = 100.0;
            int sample = 123;

            var args = new SensorSampleEventArgs <int>(time, sample);

            Assert.That(args.Time, Is.EqualTo(time));
            Assert.That(args.Sample, Is.EqualTo(sample));
        }
Esempio n. 2
0
        public void OnSample_calling_update_sends_an_evenet()
        {
            SensorSampleEventArgs <int> args = null;

            _sensor.OnSample += (sender, e) => args = e;

            var time   = 1.0;
            var sample = 234;

            _sensor.Update(time, sample);

            Assert.That(args, Is.Not.Null);
            Assert.That(args.Time, Is.EqualTo(time));
            Assert.That(args.Sample, Is.EqualTo(sample));
        }