Esempio n. 1
0
        public void Channels_Verify()
        {
            var settingWrong1 = new ChannelOutput(0);
            var settingWrong2 = new ChannelOutput(-1);
            var setting       = new ChannelOutput(1);

            Assert.Throws <InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); });
            Assert.Throws <InvalidOperationException>(() => { var s = settingWrong2.GetAndValidateString(); });
            Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); });
            Assert.Equal(setting.GetAndValidateString(), "-ac 1");
        }