public void RangeLowTest() { var e = new AttributedEntity(); e.Extensions.InitializeRules(); e.Extensions.IsValid.ShouldBeFalse(); e.Number = 5; e.Extensions.IsValid.ShouldBeTrue(); }
/// <summary> /// Copys the current Token's attributes in the target entity /// </summary> /// <param name="token">The Token to copy attributes</param> /// <param name="entity">The entity into which attributes will be copied.</param> private static void CopyTokenAttributes(SaxToken?token, AttributedEntity entity) { if (token != null && token.Value.attributes != null) { foreach (var e in token.Value.attributes) { Model.Attribute attr = new Model.Attribute(); attr.Name = e.Key.ToLower(); attr.Value = e.Value.Trim(); entity.Attributes[e.Key] = attr; } } }