public void LoadDataStrategyEnrolleeCSV_Load_Succeeds(string data, int expectedNumberOfRecords)
        {
            var loader   = new LoadDataStrategyEnrolleeCSV();
            var entities = loader.Load(data);

            Assert.AreEqual(expectedNumberOfRecords, entities.Count);
            if (expectedNumberOfRecords > 0)
            {
                Assert.IsNotNull(entities.First().FirstName);
            }
        }
コード例 #2
0
        public static List <Enrollee> Go(string[] args)
        {
            Console.WriteLine("asdfasdfasdf");
            Validate(args);
            var rawData          = new RetrieveDataStrategyFileSystem().Retrieve(args[0]);
            var loadDataStrategy = new LoadDataStrategyEnrolleeCSV();
            var enrollees        = loadDataStrategy.Load(rawData);

            new EnrolleeValidator().ValidateAll(enrollees);
            Display(enrollees.ToList());
            return(enrollees);
        }