public void ReturnInvalidWithInvalidEndTimeComma() { var element = "<media end=\"300,92ms\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(VerificationState.InvalidAttributeValue, errors.First().State); }
public void ReturnValidWithEndTimeMinusValue() { var element = "<media end=\"-30ms\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(0, errors.Count()); }
public void ReturnValidForSoundLevelWith1Decimals() { var element = "<media soundLevel=\"+30.3dB\" src=\"http://test.com/test.mp3\" />".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(0, errors.Count()); }
public void ReturnValidWithFadeOutDurTimePlusValue() { var element = "<media fadeOutDur=\"+30ms\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(0, errors.Count()); }
public void ReturnInvalidForInvalidSoundLevelTooMuchDecimals() { var element = "<media soundLevel=\"+30.003dB\" src=\"http://test.com/test.mp3\" />".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(VerificationState.InvalidAttributeValue, errors.First().State); }
public void ReturnValidWithValidBeginTime() { var element = "<media begin=\"300.92ms\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(0, errors.Count()); }
public void ReturnInvalidWithInvalidRepeatCountPlusValue() { var element = "<media repeatCount=\"+3\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(0, errors.Count()); }
public void ReturnInvalidWithInvalidRepeatCountMinusValue() { var element = "<media repeatCount=\"-3\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(VerificationState.InvalidAttributeValue, errors.First().State); }
public void ReturnValidForValidTag() { var element = "<media xml:id=\"123\" repeatCount=\"3\" soundLevel=\"+2.28dB\" fadeInDur=\"2s\" fadeOutDur=\"0.2s\"/>".ToXElement(); var strategy = new MediaStrategy(); var errors = strategy.Verify(element, SsmlPlatform.Google); Assert.AreEqual(0, errors.Count()); }