Пример #1
0
        public void FrameStartNotRequired()
        {
            var startTime = TimeSpan.FromSeconds(1);
            var length = TimeSpan.FromSeconds(4);

            var cmd = new Frame(startTime, length);

            var before = TimeSpan.FromSeconds(0.5);
            Assert.IsFalse(cmd.IsStartRequired(before));
            var after = startTime + length + TimeSpan.FromSeconds(0.5);
            Assert.IsFalse(cmd.IsStartRequired(after));
        }
Пример #2
0
        public void FrameStartRequired()
        {
            var startTime = TimeSpan.FromSeconds(0);
            var length = TimeSpan.FromSeconds(4);

            var cmd = new Frame(startTime, length);

            var middle = TimeSpan.FromSeconds(2);
            Assert.IsTrue(cmd.IsStartRequired(middle));
            //bound checks
            var begin = TimeSpan.FromSeconds(0);
            Assert.IsTrue(cmd.IsStartRequired(begin));
            var end = TimeSpan.FromSeconds(4);
            Assert.IsFalse(cmd.IsStartRequired(end));
        }