public void Value_WhenNameAttributeConstructedWithValidValue_ReturnsConstructedValue() { // ARRANGE const string expectedValue = "Test"; // ACT var directionAttribute = new NameAttribute(expectedValue); var actualValue = directionAttribute.Value; // ASSERT Assert.AreEqual(expectedValue, actualValue); }
private void SetAttributeIfExists() { _attribute = _property.GetAttribute<NameAttribute>(); }
private void SetAttributeIfExists() { IEnumerable<NameAttribute> attributes = _type.GetCustomAttributes<NameAttribute>(); _attribute = attributes.FirstOrDefault(); }