Come si utilizzano più attributi di TestCaseSource per fornire i dati di test a un test in N-Unit 2.62?Come utilizzare più attributi TestCaseSource per un N-Unit Test
Attualmente sto facendo il seguente:
[Test, Combinatorial, TestCaseSource(typeof(FooFactory), "GetFoo"), TestCaseSource(typeof(BarFactory), "GetBar")]
FooBar(Foo x, Bar y)
{
//Some test runs here.
}
E le mie fonti di dati di test case simile a questa:
internal sealed class FooFactory
{
public IEnumerable<Foo> GetFoo()
{
//Gets some foos.
}
}
internal sealed class BarFactory
{
public IEnumerable<Bar> GetBar()
{
//Gets some bars.
}
}
Purtroppo, N-Unit non sarà nemmeno dare il via alla prova dal dice che sto fornendo il numero sbagliato di argomenti. So che è possibile specificare un oggetto TestCaseObject come tipo restituito e passare in un array di oggetti, ma ho pensato che questo approccio fosse possibile.
Potete aiutarmi a risolvere questo?