-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a62aca
commit 71cf2dc
Showing
6 changed files
with
249 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ivity.AutoFixture.XUnit2.Core.Tests/SpecimenBuilders/RandomValuesParameterBuilderTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
namespace Objectivity.AutoFixture.XUnit2.Core.Tests.SpecimenBuilders | ||
{ | ||
using System; | ||
|
||
using global::AutoFixture.Xunit2; | ||
|
||
using Objectivity.AutoFixture.XUnit2.Core.SpecimenBuilders; | ||
|
||
using Xunit; | ||
|
||
[Collection("RandomValuesParameterBuilder")] | ||
[Trait("Category", "SpecimenBuilders")] | ||
public class RandomValuesParameterBuilderTests | ||
{ | ||
[Fact(DisplayName = "GIVEN uninitialized argument WHEN constructor is invoked THEN exception is thrown")] | ||
public void GivenUninitializedArgument_WhenConstructorIsInvoked_ThenExceptionIsThrown() | ||
{ | ||
// Arrange | ||
// Act | ||
// Assert | ||
Assert.Throws<ArgumentNullException>(() => new RandomValuesParameterBuilder(null)); | ||
} | ||
|
||
[Fact(DisplayName = "GIVEN empty argument WHEN constructor is invoked THEN exception is thrown")] | ||
public void GivenEmptyArgument_WhenConstructorIsInvoked_ThenExceptionIsThrown() | ||
{ | ||
// Arrange | ||
// Act | ||
// Assert | ||
Assert.Throws<ArgumentException>(() => new RandomValuesParameterBuilder(Array.Empty<object>())); | ||
} | ||
|
||
[AutoData] | ||
[Theory(DisplayName = "GIVEN empty argument WHEN Create is invoked THEN exception is thrown")] | ||
internal void GivenEmptyArgument_WhenCreateIsInvoked_ThenExceptionIsThrown(RandomValuesParameterBuilder builder) | ||
{ | ||
// Arrange | ||
// Act | ||
// Assert | ||
Assert.Throws<ArgumentNullException>(() => builder.Create(new object(), null)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters