public void MatchConstructorArgumentAgainstReadOnlyProperty( string propertyName, string parameterName, bool expected) { var prop = new PropertyInfoElement( typeof(Version).GetProperty(propertyName)); var param = new ParameterInfoElement( typeof(Version) .GetConstructor(new[] { typeof(int), typeof(int) }) .GetParameters() .Where(p => p.Name == parameterName) .Single()); var actual = new SemanticElementComparer(new SemanticReflectionVisitor()) .Equals(prop, param); Assert.Equal(expected, actual); }
public void MatchContructorArgumentAgainstReadOnlyProperty( string propertyName, string parameterName, bool expected) { var prop = new PropertyInfoElement( typeof(Version).GetProperty(propertyName)); var param = new ParameterInfoElement( typeof(Version) .GetConstructor(new[] { typeof(int), typeof(int) }) .GetParameters() .Where(p => p.Name == parameterName) .Single()); var actual = new SemanticElementComparer(new SemanticReflectionVisitor()) .Equals(prop, param); Assert.Equal(expected, actual); }