public void Get_ObtainsExtractor_Returns(LineValueExtractorType lineValueExtractorType)
        {
            var extractor1 = new Mock <ILineValueExtractor>();

            extractor1.Setup(x => x.Type).Returns(LineValueExtractorType.Positioned);

            var extractor2 = new Mock <ILineValueExtractor>();

            extractor2.Setup(x => x.Type).Returns(LineValueExtractorType.DelimitedByString);

            var sut = new LineValueExtractorFactory(new[] { extractor1.Object, extractor2.Object });

            sut.Get(lineValueExtractorType).Type.ShouldBe(lineValueExtractorType);
        }
Beispiel #2
0
 public ILineValueExtractor Get(LineValueExtractorType lineValueExtractorType)
 {
     return(_lineValueExtractors.First(x => x.Type == lineValueExtractorType));
 }