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); }
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()); }
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()); }
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()); }
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()); }