public void ReadDataInputFile() { SetupConfiguration(); var dates = DateReader.ReadDates(Path); Assert.True(dates.Count == 4); Assert.True(dates[0] == "02/27/17"); Assert.True(dates[1] == "June 2, 2018"); Assert.True(dates[2] == "Jul-13-2016"); Assert.True(dates[3] == "April 31, 2018"); }
public MainWindow() { InitializeComponent(); SetupConfiguration(); var items = new ObservableCollection <string>(); var dates = DateReader.ReadDates(DateFile).ToList(); dates.ForEach(d => items.Add(d)); DatesCmb.ItemsSource = items; GetImageBtn.IsEnabled = false; }
public void TestDateInputs() { SetupConfiguration(); var dates = DateReader.ReadDates(Path); var date1 = new FormattedDate(dates[0]); Assert.True(date1.FormattedDateString == "2017-02-27"); var date2 = new FormattedDate(dates[1]); Assert.True(date2.FormattedDateString == "2018-06-02"); var date3 = new FormattedDate(dates[2]); Assert.True(date3.FormattedDateString == "2016-07-13"); Func <FormattedDate> date4 = () => new FormattedDate(dates[3]); Assert.Throws <System.FormatException>(date4); }