Example #1
0
        public void SetCtAbx_DurationValidator_ignores_duration_if_sudden()
        {
            var rule    = new Commands.SetCtAbx.SetCtAbxDurationRule();
            var command = new Commands.SetCtAbx(0, Effect.Sudden, TimeSpan.Zero);

            rule.Validate(command).Should().BeTrue();
        }
Example #2
0
        public void SetCtAbx_DurationValidator_validates_duration(int milliseconds, bool expected)
        {
            var rule    = new Commands.SetCtAbx.SetCtAbxDurationRule();
            var command = new Commands.SetCtAbx(0, Effect.Smooth, TimeSpan.FromMilliseconds(milliseconds));

            rule.Validate(command).Should().Be(expected);
        }