Horje
xunit theory inlinedata complex object Code Example
xunit theory inlinedata complex object
public class StringTests2
{
    [Theory, PropertyData(nameof(SplitCountData))]
    public void SplitCount(string input, int expectedCount)
    {
        var actualCount = input.Split(' ').Count();
        Assert.Equal(expectedCount, actualCount);
    }

    public static IEnumerable<object[]> SplitCountData
    {
        get
        {
            // Or this could read from a file. :)
            return new[]
            {
                new object[] { "xUnit", 1 },
                new object[] { "is fun", 2 },
                new object[] { "to test with", 3 }
            };
        }
    }
}




Whatever

Related
how to calculate pisano period Code Example how to calculate pisano period Code Example
degrees symbol Code Example degrees symbol Code Example
vba refresh all Code Example vba refresh all Code Example
how to run xdebug on docker compose Code Example how to run xdebug on docker compose Code Example
clearing bit Code Example clearing bit Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8