/// <summary> /// Initializes a new instance of the <see cref="SmartSignalResultItemPresentationProperty"/> class /// </summary> /// <param name="name">The property name</param> /// <param name="value">The property value</param> /// <param name="displayCategory">The property display category</param> /// <param name="infoBalloon">The property information balloon</param> public SmartSignalResultItemPresentationProperty(string name, string value, ResultItemPresentationSection displayCategory, string infoBalloon) { this.Name = name; this.Value = value; this.DisplayCategory = displayCategory; this.InfoBalloon = infoBalloon; }
/// <summary> /// Initializes a new instance of the <see cref="ResultItemPresentationAttribute"/> class. /// </summary> /// <param name="section">The section in which the property will be presented.</param> /// <param name="title">The title to use when presenting the property's value.</param> /// <exception cref="ArgumentNullException"><paramref name="title"/> is null or contains only white-spaces.</exception> public ResultItemPresentationAttribute(ResultItemPresentationSection section, string title) { if (string.IsNullOrWhiteSpace(title)) { throw new ArgumentNullException(nameof(title), "A property cannot be presented without a title"); } this.Section = section; this.Title = title; this.Component = ResultItemPresentationComponent.Details; }
private void VerifyProperty(List <SmartSignalResultItemPresentationProperty> properties, string name, ResultItemPresentationSection displayCategory, string value, string infoBalloon) { var property = properties.SingleOrDefault(p => p.Name == name); Assert.IsNotNull(property, $"Property {name} not found"); Assert.AreEqual(displayCategory, property.DisplayCategory); Assert.AreEqual(value, property.Value); Assert.AreEqual(infoBalloon, property.InfoBalloon); }