internal static IEnumerable <IXunitTestCase> CreateSkippedDataRowTestCases(ITestMethod testMethod, TestMethodDisplay testMethodDisplay, IMessageSink diagnosticMessageSink, object[] dataRow, string skipReason) { Xunit.VsTestFramework.ThrowIfNotInUse(); var testSettings = VsTestSettingsUtil.FromTestMethod(testMethod); foreach (var instance in GetInstances(Installations.Value, testMethod, testSettings, Instances)) { yield return(new VsSkippedDataRowTestCase(instance.Id, diagnosticMessageSink, testMethodDisplay, testMethod, skipReason, dataRow)); } }
public static IEnumerable <IXunitTestCase> CreateTestCases(ITestMethod testMethod, object[] testMethodArguments, TestMethodDisplay testMethodDisplay, IMessageSink diagnosticMessageSink) { Xunit.VsTestFramework.ThrowIfNotInUse(); var testSettings = VsTestSettingsUtil.FromTestMethod(testMethod); foreach (var instance in GetInstances(Installations.Value, testMethod, testSettings, Instances)) { var testCase = new VsTestCase(instance.Id, instance.Path, testSettings, diagnosticMessageSink, testMethodDisplay, instance.CreateTestMethod(testMethod), testMethodArguments); yield return(testCase); if (string.IsNullOrEmpty(testCase.SkipReason) && instance.DidReportInstanceTestCase == false) { yield return(new VsInstanceTestCase(instance.Id, diagnosticMessageSink, testMethodDisplay, instance.CreateVisualStudioTestMethod())); } } }
public override void Deserialize(IXunitSerializationInfo info) { base.Deserialize(info); InstancePath = info.GetValue <string>(nameof(InstancePath)); Settings = VsTestSettingsUtil.FromTestMethod(TestMethod); }