-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
Currently, the CurrencyInputExtensionsTest
that is the unit test for Lib9c.GraphQL.Extensions.CurrencyInputExtensions
covered one case only. We should expand cases of that.
Change [Fact] to [Theory] with [MemberData]
-[Fact]
+[Theory]
+[MemberData("method-name")]
public void ToCurrency_ShouldConvertCorrectly()
Implement GetTestData_For_ToCurrency_ShouldConvertCorrectly
and apply to argument of [MemberData]
public static IEnumerable<object[]> GetTestData_For_ToCurrency_ShouldConvertCorrectly()
{
yield return new object[]
{
/* CurrencyInput */,
/* Currency */
};
}
[Theory]
[MemberData(nameof(GetTestData_For_ToCurrency_ShouldConvertCorrectly))]
public void ToCurrency_ShouldConvertCorrectly(
CurrencyInput currencyInput,
Currency expectedCurrency)
{
//
}
Expand test cases
public static IEnumerable<object[]> GetTestData_For_ToCurrency_ShouldConvertCorrectly()
{
yield return new object[]
{
/* CurrencyInput */,
/* Currency */
};
+ yield return new object[]
+ {
+ /* CurrencyInput */,
+ /* Currency */
+ };
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No Assignee