public bool Equals(AttributeTypeDependency other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(Target, other.Target) && Equals(Origin, other.Origin)); }
public static void AttributeDependencyAsExpected(IType targetType, Class expectedAttributeClass) { //Precondition Checks if (targetType == null) { throw new ArgumentNullException(nameof(targetType)); } if (expectedAttributeClass == null) { throw new ArgumentNullException(nameof(expectedAttributeClass)); } //Arrange, Act var expectedAttribute = new Attribute(expectedAttributeClass); var expectedAttributeDependency = new AttributeTypeDependency(targetType, new TypeInstance <Attribute>(expectedAttribute)); //Assert Assert.True(targetType.HasDependency(expectedAttributeDependency)); }