public override IEnumerable <object[]> GetData(MethodInfo testMethod) { IEnumerable <string> GetFiles(string path) { foreach (var file in Directory.GetFiles(path, $"{FileName.FullName}")) { if (!Path.GetFileNameWithoutExtension(file).EndsWith(".e")) { yield return(file); } } foreach (var dir in Directory.GetDirectories(path)) { GetFiles(dir); } } var result = GetFiles(FileName.Path).Select(s => new object[] { new ConvertCase( FileContent.From(s), FileContent.From(ReplaceExtension(s))) }); return(result); }
public void Deserialize(IXunitSerializationInfo info) { Source = FileContent.From(info.GetValue <string>(nameof(Source))); Expected = FileContent.From(info.GetValue <string>(nameof(Expected))); }