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