Skip to content

Commit

Permalink
Small improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrzajac committed Dec 12, 2023
1 parent 6ad90d9 commit 5a74346
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public void GivenUninitializedArgument_WhenGetCustomizationIsInvoked_ThenExcepti
Action act = () => attribute.GetCustomization(null);

// Assert
act.Should().Throw<ArgumentNullException>().And.ParamName.Should().Be("parameter");
act.Should().Throw<ArgumentNullException>()
.And.ParamName.Should().Be("parameter");
}

[MemberData(nameof(CustomizationUsageTestData))]
Expand All @@ -114,11 +115,12 @@ public void GivenSupportedNumericType_WhenGetCustomizationIsInvoked_ThenReturnsN
item = (T)fixture.Create(request.Object, new SpecimenContext(fixture));

// Assert
item.Should().BeOfType(type).And.Match(x => x.CompareTo(zero) < 0);
item.Should().BeOfType(type)
.And.Match(x => x.CompareTo(zero) < 0);
}

[MemberData(nameof(CustomizationUsageTestData))]
[Theory(DisplayName = "GIVEN supported numeric array type WHEN GetCustomization is invoked THEN returns negative value")]
[Theory(DisplayName = "GIVEN supported numeric array type WHEN GetCustomization is invoked THEN returns negative values")]
public void GivenSupportedNumericArrayType_WhenGetCustomizationIsInvoked_ThenReturnsNegativeValues<T>(
T item)
where T : IComparable<T>
Expand Down Expand Up @@ -160,15 +162,16 @@ public void GivenSupportedEnumType_WhenGetCustomizationIsInvoked_ThenReturnsNega
var result = (Enum)fixture.Create(request.Object, new SpecimenContext(fixture));

// Assert
result.Should().BeOfType(type).And.BeOneOf(expectedValues);
result.Should().BeOfType(type)
.And.BeOneOf(expectedValues);
}

[InlineData(SignedByteNumbers.MinusTwo, SignedByteNumbers.MinusOne)]
[InlineData(ShortNumbers.MinusTwo, ShortNumbers.MinusOne)]
[InlineData(IntNumbers.MinusTwo, IntNumbers.MinusOne)]
[InlineData(LongNumbers.MinusTwo, LongNumbers.MinusOne)]
[Theory(DisplayName = "GIVEN supported enum array type WHEN GetCustomization is invoked THEN returns negative value")]
public void GivenSupportedEnumArrayType_WhenGetCustomizationIsInvoked_ThenReturnsNegativeValue(
[Theory(DisplayName = "GIVEN supported enum array type WHEN GetCustomization is invoked THEN returns negative values")]
public void GivenSupportedEnumArrayType_WhenGetCustomizationIsInvoked_ThenReturnsNegativeValues(
params Enum[] expectedValues)
{
// Arrange
Expand Down

0 comments on commit 5a74346

Please sign in to comment.