예제 #1
0
 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;
 }
예제 #2
0
 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;
         }
     }
 }