public TestResult(DerDieDasData derDieDasData, string article, string plural) { ParamValidator.EnsureParametersAreValid(new NullValidatorWithValue<DerDieDasData>(() => derDieDasData, derDieDasData), new StringValidatorWithValue(() => article, article), new StringValidatorWithValue(() => plural, plural)); _derDieDasData = derDieDasData; _article = article; _plural = plural; }
private IEnumerable<DerDieDasData> LoadFile(string fileName) { using (var fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read)) using (var streamReader = new StreamReader(fileStream, Encoding.UTF7)) { while (streamReader.EndOfStream == false) { var lineRead = streamReader.ReadLine(); var derDieDasata = new DerDieDasData(lineRead, new ArticleFactory()); yield return derDieDasata; } } }