예제 #1
0
        public void ReturnInvalidForInvalidAttribute()
        {
            var element  = "<prosody name=\"test\"></prosody>".ToXElement();
            var strategy = new ProsodyStrategy();
            var errors   = strategy.Verify(element);

            Assert.AreEqual(VerificationState.InvalidAttribute, errors.First().State);
        }
예제 #2
0
        public void ReturnValidForValidTagPitchInSemitones()
        {
            var element  = "<prosody pitch=\"+2st\">I am low pitched</prosody>.".ToXElement();
            var strategy = new ProsodyStrategy();
            var errors   = strategy.Verify(element);

            Assert.AreEqual(0, errors.Count());
        }
예제 #3
0
        public void ReturnValidForValidTagRateInPercent()
        {
            var element  = "<prosody rate=\"23%\">I am slow</prosody>.".ToXElement();
            var strategy = new ProsodyStrategy();
            var errors   = strategy.Verify(element);

            Assert.AreEqual(0, errors.Count());
        }
예제 #4
0
        public void ReturnValidForValidTagVolumeInDb()
        {
            var element  = "<prosody volume=\"-2.33dB\">I am silent</prosody>.".ToXElement();
            var strategy = new ProsodyStrategy();
            var errors   = strategy.Verify(element);

            Assert.AreEqual(0, errors.Count());
        }
예제 #5
0
        public void ReturnValidForValidTagRate()
        {
            var element  = "<prosody rate=\"x-slow\">I speak quite slowly</prosody>.".ToXElement();
            var strategy = new ProsodyStrategy();
            var errors   = strategy.Verify(element);

            Assert.AreEqual(0, errors.Count());
        }