コード例 #1
0
        public void TestGetPixelRectangle()
        {
            // arrange
            var @event = new SpectralEvent()
            {
                EventEndSeconds    = 9,
                EventStartSeconds  = 1,
                HighFrequencyHertz = 900,
                LowFrequencyHertz  = 100,
            };

            var converters = new UnitConverters(0, 10, 1000, 100, 100);

            // act
            var rect = converters.GetPixelRectangle(@event);

            // assert
            Assert.AreEqual(10, rect.Left);
            Assert.AreEqual(10, rect.Top);
            Assert.AreEqual(80, rect.Width);
            Assert.AreEqual(80, rect.Height);
        }