public void ReturnInvalidForInvalidTag() { var element = "<amazon:effect name1=\"bla\" />".ToXElement(); var strategy = new AmazonEmotionStrategy(); var errors = strategy.Verify(element); Assert.AreEqual(VerificationState.MissingAttribute, errors.First().State); }
public void ReturnValidForValidTag() { var element = "<amazon:emotion name=\"excited\" intensity=\"high\"/>".ToXElement(); var strategy = new AmazonEmotionStrategy(); var errors = strategy.Verify(element); Assert.AreEqual(0, errors.Count()); }
public void ReturnInvalidForInvalidIntensityAttributeValue() { var element = "<amazon:effect name=\"excited\" intensity=\"higherThanNormal\" />".ToXElement(); var strategy = new AmazonEmotionStrategy(); var errors = strategy.Verify(element).ToList(); Assert.AreEqual(1, errors.Count); Assert.AreEqual(VerificationState.InvalidAttributeValue, errors[0].State); }