public void should_not_be_equal_to_other_unit_patterns() { // --arrange var target1 = new IsParameterInfoList(); var target2 = new Util.OtherUnitPattern(); // --assert target1.Equals(target2).Should().BeFalse(); target2.Equals(target1).Should().BeFalse(); }
public void all_instances_should_be_equal() { // --arrange var target1 = new IsParameterInfoList(); var target2 = new IsParameterInfoList(); // --assert target1.Equals(target2).Should().BeTrue(); target2.Equals(target1).Should().BeTrue(); }
public void should_not_match_unit_kind_other_than_parameter_info() { // --arrange var unitId = new UnitId("parameterInfoList", SpecialTag.Argument); var target = new IsParameterInfoList(); // --act // --assert target.Matches(unitId).Should().BeFalse(); }
public void should_not_match_parameter_info_with_not_argument_tag([Values(null, "tag")] object?tag) { var parameterInfoList = typeof(Subject).GetMethod(nameof(Subject.Foo))?.GetParameters(); // --arrange var unitId = new UnitId(parameterInfoList, tag); var target = new IsParameterInfoList(); // --act // --assert target.Matches(unitId).Should().BeFalse(); }
public void should_match_parameter_info_with_argument_tag() { var parameterInfoList = typeof(Subject).GetMethod(nameof(Subject.Foo))?.GetParameters(); // --arrange var unitId = new UnitId(parameterInfoList, SpecialTag.Argument); var target = new IsParameterInfoList(); // --act // --assert target.Matches(unitId).Should().BeTrue(); }